PDA

View Full Version : [SOLVED] copied userform error



ppermuth
06-21-2016, 08:34 PM
Hello!


I developed a userform in a 'scrapbook' version of a primary/live workbook and it works wonderfully. A command button on one of the worksheets calls the form with the following:

Private Sub GoShopping_Click()
GrocerySelect.Show
End Sub

No error is encountered. All systems are go.

I copied the userform to the live version of the workbook (drag and drop). I also copied the command button to the same worksheet in the live version. The code is exactly the same:
Private Sub GoShopping_Click()
GrocerySelect.Show
End Sub


When I try to use the button in the live version, however, the following error gets thrown:

run time error 1004
method 'range' of object'_Worksheet' failed

and going to 'Debug' from the error window, the following line is highlighted:
GrocerySelect.Show


I can't figure out why the copied version to the live workbook doesn't work/what I need to change so that it does. I would greatly appreciate help on this!

Thank you!

snb
06-22-2016, 12:45 AM
Please use codetags around VBA code.

Please show the whole code that is being controlled by/in the userform.

mikerickson
06-22-2016, 07:34 AM
Have you checked that the drag and drop didn't change the name of the userform?

ppermuth
06-22-2016, 06:44 PM
Have you checked that the drag and drop didn't change the name of the userform?

There is a very good reason you are a guru and I am a novice .... the userform got renamed. It has since been changed and works wonderfully. Thanks so much for your time!