Home |
Search |
Today's Posts |
#1
![]()
Posted to microsoft.public.excel.programming
|
|||
|
|||
![]()
I'm trying to set the names of two worksheets. I have a macro in the first
one that opens the second worksheet, and writes data to several cells in the 2nd worksheet. I need to have the 2nd worksheet become the active sheet, and close the first worksheet before I proceed. I'm trying to name the workbooks so I can activate either one, but what I really need to do is have the 2nd worksheet continue calling macros after the 1st sheet has been closed. The code I'm using is below. Sub timeout() Dim wbSource As Workbook, wbZip As Workbook Dim wbName As String wbName = Range("A2").Value wbZip = ActiveWorkbook wbSource = wbName Windows(wbName).Activate ActiveWorkbook.Close SaveChanges:=True Windows(wbZip).Activate Worksheets(2).Activate Range("B1").Select Call ZipTheFile End Sub |
Thread Tools | Search this Thread |
Display Modes | |
|
|
![]() |
||||
Thread | Forum | |||
problem with setting the worksheet variable ws | Excel Discussion (Misc queries) | |||
Link variable data from one worksheet to another worksheet? | New Users to Excel | |||
Variable worksheet name (tab) linked to cell in same worksheet | Excel Worksheet Functions | |||
Looking up a variable in one worksheet and copying information from another column to another worksheet?? | Excel Discussion (Misc queries) | |||
Problem trying to us a range variable as an array variable | Excel Programming |