Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 27,285
Default 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
Search this Thread:

Advanced Search
Display Modes

Posting Rules

Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On


Similar Threads
Thread Thread Starter Forum Replies Last Post
Importing numbers from 200 worksheets into 1 Al Excel Discussion (Misc queries) 4 January 26th 10 02:56 AM
How to Find Data in another Worksheet without activating it? HumanJHawkins Excel Worksheet Functions 2 July 31st 09 11:35 AM
Importing data from daily worksheets into my annual report Sonia Marie[_2_] Excel Discussion (Misc queries) 2 July 27th 09 10:58 PM
Importing worksheets into another workbook. Rose Excel Discussion (Misc queries) 4 September 12th 07 10:03 PM
Help! importing data from other worksheets... Pete Excel Worksheet Functions 0 May 4th 06 12:06 PM


All times are GMT +1. The time now is 04:54 PM.

Powered by vBulletin® Copyright ©2000 - 2024, Jelsoft Enterprises Ltd.
Copyright ©2004-2024 ExcelBanter.
The comments are property of their posters.
 

About Us

"It's about Microsoft Excel"