Home |
Search |
Today's Posts |
#1
![]()
Posted to microsoft.public.excel.programming
|
|||
|
|||
![]()
I want the file containing the macro to close the "Label Supplier
Stock.xls" file on closing. Why does it give me "error 9 - subscript out of range"??? DG Option Explicit Option Base 1 Const StkFile = "G:\Planning\Packaging\packaging2\Label Stocks\Label Supplier Stock.xls" Const StkFile_window = "Label Supplier Stock.xls" ' Private Sub Workbook_BeforeClose(Cancel As Boolean) Windows(StkFile_window).Close savechanges:=False End Sub Private Sub Workbook_Open() Dim this_workbook_name As String this_workbook_name = ThisWorkbook.Name Workbooks.Open Filename:=StkFile, UpdateLinks:=False Windows(this_workbook_name).Activate End Sub |
Thread Tools | Search this Thread |
Display Modes | |
|
|
![]() |
||||
Thread | Forum | |||
Macro to update a column in a work based on another work sheet | New Users to Excel | |||
how can i automatically generate work order numbers from work orde | Excel Discussion (Misc queries) | |||
flash object dont work in my excel work sheet | Excel Discussion (Misc queries) | |||
If I have a work sheet protected and try to run a macro to hide rows or columns it won't work. Correct? | Excel Programming | |||
Counting dates in multiple work sheets and work books | Excel Discussion (Misc queries) |