+ Reply to Thread
Results 1 to 5 of 5

prevention to delete selected item for the first & lastrow from listbox on userform

  1. #1
    Forum Contributor
    Join Date
    09-21-2022
    Location
    africa
    MS-Off Ver
    2019
    Posts
    175

    prevention to delete selected item for the first & lastrow from listbox on userform

    Hi
    I want when try delete selected item for the first or last row into listbox on userform should pops message "you have not permission to do that" ,otherwise I can delete the others selected items when select the items from combobox1:3 .
    here is the code
    Please Login or Register  to view this content.
    thanks
    Attached Files Attached Files
    Last edited by Maklil; 01-11-2023 at 09:06 AM. Reason: adjusting title of thread

  2. #2
    Forum Expert
    Join Date
    08-17-2007
    Location
    Poland
    Posts
    2,532

    Re: prevention to delete selected item for the first & lastrow from listbox on userform

    Change the FilterData procedure to the following:
    Please Login or Register  to view this content.
    And at the beginning of the ButtonDeleteRow_Click procedure add:
    Please Login or Register  to view this content.
    Artik

  3. #3
    Forum Contributor
    Join Date
    09-21-2022
    Location
    africa
    MS-Off Ver
    2019
    Posts
    175

    Re: prevention to delete selected item for the first & lastrow from listbox on userform

    thanks . how also delete from listbox when select the item ?
    it just deletes from sheet without I see any deletion from listbox .

  4. #4
    Forum Expert
    Join Date
    08-17-2007
    Location
    Poland
    Posts
    2,532

    Re: prevention to delete selected item for the first & lastrow from listbox on userform

    You probably only need to add a call to two other procedures at the end of the ButtonDeleteRow_Click procedure:
    Please Login or Register  to view this content.
    Artik

  5. #5
    Forum Contributor
    Join Date
    09-21-2022
    Location
    africa
    MS-Off Ver
    2019
    Posts
    175

    Re: prevention to delete selected item for the first & lastrow from listbox on userform

    much appreciated for your help

+ Reply to Thread

Thread Information

Users Browsing this Thread

There are currently 1 users browsing this thread. (0 members and 1 guests)

Similar Threads

  1. [SOLVED] Adding delete code on userform to delete a row on sheet by selecting item on a listbox
    By darbar76528 in forum Excel Programming / VBA / Macros
    Replies: 12
    Last Post: 11-07-2020, 12:50 PM
  2. Delete selected item from ListBox with KeyDown event
    By esbencito in forum Excel Programming / VBA / Macros
    Replies: 4
    Last Post: 03-08-2020, 03:57 AM
  3. [SOLVED] how to get the next item value based on the selected item in userform listbox ?
    By karmapala in forum Excel Programming / VBA / Macros
    Replies: 2
    Last Post: 12-27-2019, 05:49 AM
  4. [SOLVED] Userform Listbox - Display selected item in cell
    By Neuk in forum Excel Programming / VBA / Macros
    Replies: 3
    Last Post: 01-22-2018, 03:39 PM
  5. Userform listbox - Getting Sheet row of selected item
    By johnny_p in forum Excel Programming / VBA / Macros
    Replies: 3
    Last Post: 07-14-2015, 05:00 AM
  6. [SOLVED] listindex=0 when first item selected in a multiselect listbox on a userform?
    By mcdermott2 in forum Excel Programming / VBA / Macros
    Replies: 17
    Last Post: 04-17-2013, 12:38 PM
  7. Keep selected ListBox item highlighted when reopening userform
    By berlini in forum Excel Programming / VBA / Macros
    Replies: 3
    Last Post: 08-22-2011, 08:38 AM

Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts

Search Engine Friendly URLs by vBSEO 3.6.0 RC 1