Home |
Search |
Today's Posts |
#1
Posted to microsoft.public.excel.programming
|
|||
|
|||
Activating Worksheets and Importing Data from them
if the checkbox is an activeX checkbox. Assume the workbook to open is
named "C:\Myfiles\3Years.xls" Private Sub Checkbox1_Click() Dim wkbk as Workbook if me.Checkbox1.Value = True then ' check if 3Years is already open on Error Resume Next set wkbk = Workbooks("3Years.xls") On Error goto 0 if wkbk is nothing then ' it wasn't open, so open it set wkbk = Workbooks.Open("C:\MyFiles\3Years.xls") End if wkbk.Activate ' checkbox1 is for the first sheet ' adjust here for the other checkboxes/sheets wkbk.worksheets(1).Activate End if End Sub copy the above event for the other two checkboxes and make the indicated adjustments (activate sheets 2 and 3 respectively) -- Regards, Tom Ogilvy "Johnny Yakoo" <Johnny wrote in message ... What I'd like help with please, is as follows: - i have one master file with three check-boxes on 1 worksheet - those check boxes correspond to adjacent cells for a particular year - those 3 years correspond to another workbook with 3 tabs, one for each year I would like to be able to click on one of the boxes for a given year in the main file, which will open the workbook with all three years and then select the appropriate year worksheet. I would greatly appreciate help on this issue. JY |
Reply |
Thread Tools | Search this Thread |
Display Modes | |
|
|
Similar Threads | ||||
Thread | Forum | |||
Importing numbers from 200 worksheets into 1 | Excel Discussion (Misc queries) | |||
How to Find Data in another Worksheet without activating it? | Excel Worksheet Functions | |||
Importing data from daily worksheets into my annual report | Excel Discussion (Misc queries) | |||
Importing worksheets into another workbook. | Excel Discussion (Misc queries) | |||
Help! importing data from other worksheets... | Excel Worksheet Functions |