Home |
Search |
Today's Posts |
|
#1
![]()
Posted to microsoft.public.excel.programming
|
|||
|
|||
![]()
This is driving me NUTS! This code works just fine in other workbooks, but
something is wrong here. I am getting the error on the last line of code. Same error when trying to activate the wbkSum workbook too. Here is the code: Dim wbkSum As Workbook Dim wbkData As Workbook Dim iOffice As Integer Set wbkSum = Workbooks("My DMR Summary May 2007.xls") Set wbkData = ActiveWorkbook Windows("wbkData").Activate |
#2
![]()
Posted to microsoft.public.excel.programming
|
|||
|
|||
![]()
wbkData.Activate
Tim "David" wrote in message ... This is driving me NUTS! This code works just fine in other workbooks, but something is wrong here. I am getting the error on the last line of code. Same error when trying to activate the wbkSum workbook too. Here is the code: Dim wbkSum As Workbook Dim wbkData As Workbook Dim iOffice As Integer Set wbkSum = Workbooks("My DMR Summary May 2007.xls") Set wbkData = ActiveWorkbook Windows("wbkData").Activate |
#3
![]()
Posted to microsoft.public.excel.programming
|
|||
|
|||
![]()
Thanks much! Works fine now!
"Tim Williams" wrote: wbkData.Activate Tim "David" wrote in message ... This is driving me NUTS! This code works just fine in other workbooks, but something is wrong here. I am getting the error on the last line of code. Same error when trying to activate the wbkSum workbook too. Here is the code: Dim wbkSum As Workbook Dim wbkData As Workbook Dim iOffice As Integer Set wbkSum = Workbooks("My DMR Summary May 2007.xls") Set wbkData = ActiveWorkbook Windows("wbkData").Activate |
#4
![]()
Posted to microsoft.public.excel.programming
|
|||
|
|||
![]()
I wouldn't go through the windows collection.
I'd just use: wbkdata.activate David wrote: This is driving me NUTS! This code works just fine in other workbooks, but something is wrong here. I am getting the error on the last line of code. Same error when trying to activate the wbkSum workbook too. Here is the code: Dim wbkSum As Workbook Dim wbkData As Workbook Dim iOffice As Integer Set wbkSum = Workbooks("My DMR Summary May 2007.xls") Set wbkData = ActiveWorkbook Windows("wbkData").Activate -- Dave Peterson |
#5
![]()
Posted to microsoft.public.excel.programming
|
|||
|
|||
![]()
hi.
I see that your code is for a specific workbook and specific worksheet. just looking at the code you posted, i suspect this may be your problem. the scrip out of range reeor message pops up usually when excel can't find something. Edit your workbook name and worksheet name and see if that solves your problem. if not, post back with more detail. Regards FSt1 "David" wrote: This is driving me NUTS! This code works just fine in other workbooks, but something is wrong here. I am getting the error on the last line of code. Same error when trying to activate the wbkSum workbook too. Here is the code: Dim wbkSum As Workbook Dim wbkData As Workbook Dim iOffice As Integer Set wbkSum = Workbooks("My DMR Summary May 2007.xls") Set wbkData = ActiveWorkbook Windows("wbkData").Activate |
Reply |
Thread Tools | Search this Thread |
Display Modes | |
|
|
![]() |
||||
Thread | Forum | |||
runtime error 9 subscript out of range | Excel Worksheet Functions | |||
Runtime Error 9, Subscript Out of Range. When linking between word | Excel Discussion (Misc queries) | |||
Runtime Error '9' Subscript out of range HELP | Excel Programming | |||
Runtime Error - Subscript out of range despite On Error statement | Excel Programming | |||
Getting Excel Runtime Error 9: Subscript out of range | Excel Programming |