Home |
Search |
Today's Posts |
#1
![]()
Posted to microsoft.public.excel.programming
|
|||
|
|||
![]()
I'm having trouble getting my head round a problem I'm having with some
code. I have created a userform in a workbook (let's call this workbook1) which requires users to enter data which is then used to configure a worksheet. There are 2 worksheets, the one called Lookup is hidden and the forms refers to this one to find data for comboboxes. The userform then configures the Machine worksheet and the userform is hidden. My problem arises (sometimes) when I have workbook1 open, but I am working on another workbook (say workbook2). I can't remember the exact error I get, but when I debug, it takes me to one of the lines in the workbook1 form's code referring to the range in Lookup for a combobox. I'm guessing the reason I'm getting an error is because workbook2 does not have a sheet called Lookup. Can anyone offer a reason for this happeneing? Is there a way to render the code in the userform inoperative when the form is hidden? Workbook1 is actually saved as a template so, once the form has finished taking data and has been hidden, there will never be a use for it again. Can the entire form be deleted in code? I could post some of the code, but I'm not sure which bits are relevant. -- Ian -- |
Thread Tools | Search this Thread |
Display Modes | |
|
|
![]() |
||||
Thread | Forum | |||
vba code runs...need spaces ........ | Excel Discussion (Misc queries) | |||
Code only runs once | Excel Programming | |||
Code runs in 2002 but not in 97!? | Excel Programming | |||
Code slows down after a few runs | Excel Programming | |||
How to keep from going dizzy when my code runs | Excel Programming |