Home |
Search |
Today's Posts |
#1
Posted to microsoft.public.excel.programming
|
|||
|
|||
Trouble manipulating worksheet chosen from combo box
I have filled four combo boxes with the worksheet names from the workbook. I
want to copy a (different) range from each worksheet chosen and paste them together into a different worksheet within the workbook. I am having trouble at the point where I am getting the results of the combo box to actually call the chosen worksheet and get the range. The line of code is: With cboInv.Range("B2:AF3580") 'cboInv is the first combobox variable at this point I get this error message: Run time error '91': Object variable or With variable block not set I have the statement "Dim cboInv as Worksheet" at the top of the procedure, but if I remove that I still get a compile error on the ".Range" part of the code: Method or data member not found It's probably something basic I'm missing; perhaps someone could point it out? |
#2
Posted to microsoft.public.excel.programming
|
|||
|
|||
Trouble manipulating worksheet chosen from combo box
"PV Jefe" schreef in bericht ... I have filled four combo boxes with the worksheet names from the workbook. I want to copy a (different) range from each worksheet chosen and paste them together into a different worksheet within the workbook. I am having trouble at the point where I am getting the results of the combo box to actually call the chosen worksheet and get the range. The line of code is: With cboInv.Range("B2:AF3580") 'cboInv is the first combobox variable If in the combobox i.e. 'Sheet1' is selected, it is just text but it should be an object. Try this: With Worksheets(cboInv.Text).Range("B2:AF3580") at this point I get this error message: Run time error '91': Object variable or With variable block not set I have the statement "Dim cboInv as Worksheet" at the top of the procedure, but if I remove that I still get a compile error on the ".Range" part of the code: Method or data member not found It's probably something basic I'm missing; perhaps someone could point it out? |
#3
Posted to microsoft.public.excel.programming
|
|||
|
|||
Trouble manipulating worksheet chosen from combo box
Hi moon,
Muchas Gracias - that was perfect! I knew there was some little (!) thing I needed. I appreciate your help very much! |
Reply |
Thread Tools | Search this Thread |
Display Modes | |
|
|
Similar Threads | ||||
Thread | Forum | |||
Go to a chosen worksheet | Excel Worksheet Functions | |||
Auto-filtering based on a value chosen in a combo box? | Excel Discussion (Misc queries) | |||
Still Having Trouble with Combo Box | Excel Programming | |||
How do I make Excel worksheet tabs change appearance when chosen . | Excel Discussion (Misc queries) | |||
trouble with combo box | Excel Programming |