parkfairfax
Programmer
I use the following code fine to open numerous spreadsheets and it opens them fine...
Dim wks As Workbook, strwks As String
strwks = "c:\Reports\Test4.xls"
Set wks = GetObject(strwks)
wks.Parent.Visible = True
wks.Windows(1).Visible = True
wks.Worksheets("FY01".Select
Set wks = Nothing
However, now new spreadsheeets that I create will open, but as soon as I click anywhere in the open spreadsheet, ie. the open window or a different worksheet, I get the following message..
The Instruction as "0x304571d" referenced memory at "0x000000f4". The memory could not be read. Click OK to terminate program, Click cancel to debug.
I thought that this was happening because I was renaming my worksheets & VBA was not getting it, but now I see that even new workbooks that I create do not open correctly.
Does anybody have any ideas what's going on?
Thanks,
garry
Dim wks As Workbook, strwks As String
strwks = "c:\Reports\Test4.xls"
Set wks = GetObject(strwks)
wks.Parent.Visible = True
wks.Windows(1).Visible = True
wks.Worksheets("FY01".Select
Set wks = Nothing
However, now new spreadsheeets that I create will open, but as soon as I click anywhere in the open spreadsheet, ie. the open window or a different worksheet, I get the following message..
The Instruction as "0x304571d" referenced memory at "0x000000f4". The memory could not be read. Click OK to terminate program, Click cancel to debug.
I thought that this was happening because I was renaming my worksheets & VBA was not getting it, but now I see that even new workbooks that I create do not open correctly.
Does anybody have any ideas what's going on?
Thanks,
garry