+ Reply to Thread
Results 1 to 6 of 6

program working in the code application, but not the excel sheet

  1. #1
    Forum Contributor
    Join Date
    05-20-2013
    Location
    Ann Arbor, MI
    MS-Off Ver
    Excel 2010
    Posts
    255

    program working in the code application, but not the excel sheet

    Hi all,

    When I run my program by pressing play in the code application, everything works just the way I want it to, but when I try to run it through the excel sheet by pressing a button, it is not doing what I want it to do.

    I am using this code: It is in one of my userforms.

    Please Login or Register  to view this content.
    I have attached the workbook. The code can be found under the userform 'MelvMaint' at the bottom.
    Through the worksheet: 'Home Page (Sheet)' -> 'Maintenance (button)' -> 'Update (tab)' - > 'delete (button)' -> (changes are made on 'Read Only')
    --I want the combo boxes to automatically update once an item is DELETED from the list

    Please Help
    Attached Files Attached Files

  2. #2
    Forum Guru TMS's Avatar
    Join Date
    07-15-2010
    Location
    The Great City of Manchester, NW England ;-)
    MS-Off Ver
    MSO 2007,2010,365
    Posts
    48,121

    Re: program working in the code application, but not the excel sheet

    When you use the With ... End With construct, you need to link the ranges and rows to the worksheet (in this case). So, where you have Range(...) or Rows.Count, put a full stop in front of it.


    Please Login or Register  to view this content.

    Regards, TMS
    Trevor Shuttleworth - Retired Excel/VBA Consultant

    I dream of a better world where chickens can cross the road without having their motives questioned

    'Being unapologetic means never having to say you're sorry' John Cooper Clarke


  3. #3
    Forum Contributor
    Join Date
    05-20-2013
    Location
    Ann Arbor, MI
    MS-Off Ver
    Excel 2010
    Posts
    255

    Re: program working in the code application, but not the excel sheet

    Hi TMShucks,

    I am very new to vba.
    'Full stop?' Is that the '.' you put before each 'Range'
    thanks

  4. #4
    Forum Contributor
    Join Date
    05-20-2013
    Location
    Ann Arbor, MI
    MS-Off Ver
    Excel 2010
    Posts
    255

    Re: program working in the code application, but not the excel sheet

    Im not sure if I should post a new thread for this, but now its doing something different than before. I'm adding 'Emily' to the list more than once, so I have about 5 Emily's now on the list, but when I press delete, It deletes all 5 at once. Is there a way to make it so that it deletes only the one that I have selected from the combobox?

  5. #5
    Forum Guru JosephP's Avatar
    Join Date
    03-27-2012
    Location
    Ut
    MS-Off Ver
    2003/10
    Posts
    7,328

    Re: program working in the code application, but not the excel sheet

    perhaps
    Please Login or Register  to view this content.
    Josie

    if at first you don't succeed try doing it the way your wife told you to

  6. #6
    Forum Contributor
    Join Date
    05-20-2013
    Location
    Ann Arbor, MI
    MS-Off Ver
    Excel 2010
    Posts
    255

    Re: program working in the code application, but not the excel sheet

    Thanks Joseph! Works Great

+ Reply to Thread

Thread Information

Users Browsing this Thread

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

Tags for this Thread

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