Home |
Search |
Today's Posts |
#1
![]()
Posted to microsoft.public.excel.programming
|
|||
|
|||
![]()
A bullet-proof application has been running for 5 years. I made a few small
changes and tested them. Everything worked perfect. Now the weird part. The code works fine if the workbook is the <only workbook open. If I open a second, unrelated workbook, EVEN A BLANK BOOK ONE WITH NO MACROS, I get a "Subscript out of range" error. Why why why??? I should note that the code contains no Declare or Dim statements because all my variables are used only within the module. Any help is appreciated. Paul Here is the code: Sub Findstore() ActiveWindow.WindowState = xlMinimized SHTNAME = ActiveSheet.Name AAAA = Activecell.Value 'example of typical value: "555 New York" 'Below line is where the error occurs Sheets("VAR1").Range("M8").Value = AAAA If AAAA = "" Then AAAA = Range("C5").Value |
Thread Tools | Search this Thread |
Display Modes | |
|
|
![]() |
||||
Thread | Forum | |||
EXCEL WORK BOOK DUPLICATES WHEN OPENED | Excel Discussion (Misc queries) | |||
Auto sort when worksheet/book opened | Excel Discussion (Misc queries) | |||
Strange Excel error | Excel Discussion (Misc queries) | |||
Strange Calculation Error in Excel | Excel Discussion (Misc queries) | |||
how to make a macro and run in every excel book that opened? | Excel Programming |