Home |
Search |
Today's Posts |
#1
![]()
Posted to microsoft.public.excel.programming
|
|||
|
|||
![]()
Using the code:
Dim oApp as Object intCount as Integer Set oApp = CreateObject("Excel.Application") oApp.Workbooks.Open("C:\Test.xls") to open a .xls with late binding, what would I use to count the worksheets? And I'm having to use late binding to avoid reference issues and cannot use early binding. (Thanks to our IT Dept.) Thanks M |
#2
![]()
Posted to microsoft.public.excel.programming
|
|||
|
|||
![]()
Hi
not tested but try Dim oApp as Object Dim wbk intCount as Integer Set oApp = CreateObject("Excel.Application") set wbk = oApp.Workbooks.Open("C:\Test.xls") intcount = wbk.worksheets.count -- Regards Frank Kabel Frankfurt, Germany "M" schrieb im Newsbeitrag ... Using the code: Dim oApp as Object intCount as Integer Set oApp = CreateObject("Excel.Application") oApp.Workbooks.Open("C:\Test.xls") to open a .xls with late binding, what would I use to count the worksheets? And I'm having to use late binding to avoid reference issues and cannot use early binding. (Thanks to our IT Dept.) Thanks M |
#3
![]()
Posted to microsoft.public.excel.programming
|
|||
|
|||
![]()
Dim oApp as Object
Dim oWb as Object intCount as Integer Set oApp = CreateObject("Excel.Application") Set oWb = oApp.Workbooks.Open("C:\Test.xls") intCount = oWb.Woksheets.Count -- HTH Bob Phillips ... looking out across Poole Harbour to the Purbecks (remove nothere from the email address if mailing direct) "M" wrote in message ... Using the code: Dim oApp as Object intCount as Integer Set oApp = CreateObject("Excel.Application") oApp.Workbooks.Open("C:\Test.xls") to open a .xls with late binding, what would I use to count the worksheets? And I'm having to use late binding to avoid reference issues and cannot use early binding. (Thanks to our IT Dept.) Thanks M |
#4
![]()
Posted to microsoft.public.excel.programming
|
|||
|
|||
![]()
Cookin' with gas! Thanks guys!
M -----Original Message----- Dim oApp as Object Dim oWb as Object intCount as Integer Set oApp = CreateObject("Excel.Application") Set oWb = oApp.Workbooks.Open("C:\Test.xls") intCount = oWb.Woksheets.Count -- HTH Bob Phillips ... looking out across Poole Harbour to the Purbecks (remove nothere from the email address if mailing direct) "M" wrote in message ... Using the code: Dim oApp as Object intCount as Integer Set oApp = CreateObject("Excel.Application") oApp.Workbooks.Open("C:\Test.xls") to open a .xls with late binding, what would I use to count the worksheets? And I'm having to use late binding to avoid reference issues and cannot use early binding. (Thanks to our IT Dept.) Thanks M . |
#5
![]()
Posted to microsoft.public.excel.programming
|
|||
|
|||
![]()
Please! wbk should be declared as an object, not variant<vbg
Bob "Frank Kabel" wrote in message ... Hi not tested but try Dim oApp as Object Dim wbk intCount as Integer Set oApp = CreateObject("Excel.Application") set wbk = oApp.Workbooks.Open("C:\Test.xls") intcount = wbk.worksheets.count -- Regards Frank Kabel Frankfurt, Germany "M" schrieb im Newsbeitrag ... Using the code: Dim oApp as Object intCount as Integer Set oApp = CreateObject("Excel.Application") oApp.Workbooks.Open("C:\Test.xls") to open a .xls with late binding, what would I use to count the worksheets? And I'm having to use late binding to avoid reference issues and cannot use early binding. (Thanks to our IT Dept.) Thanks M |
#6
![]()
Posted to microsoft.public.excel.programming
|
|||
|
|||
![]()
Bob
of course correct, somehow forgot that.... -- Regards Frank Kabel Frankfurt, Germany "Bob Phillips" schrieb im Newsbeitrag ... Please! wbk should be declared as an object, not variant<vbg Bob "Frank Kabel" wrote in message ... Hi not tested but try Dim oApp as Object Dim wbk intCount as Integer Set oApp = CreateObject("Excel.Application") set wbk = oApp.Workbooks.Open("C:\Test.xls") intcount = wbk.worksheets.count -- Regards Frank Kabel Frankfurt, Germany "M" schrieb im Newsbeitrag ... Using the code: Dim oApp as Object intCount as Integer Set oApp = CreateObject("Excel.Application") oApp.Workbooks.Open("C:\Test.xls") to open a .xls with late binding, what would I use to count the worksheets? And I'm having to use late binding to avoid reference issues and cannot use early binding. (Thanks to our IT Dept.) Thanks M |
#7
![]()
Posted to microsoft.public.excel.programming
|
|||
|
|||
![]()
Object variables are stored as 32-bit (4-byte) addresses that refer to
objects. Using the Set statement, a variable declared as an Object can have any object reference assigned to it. Variant 16 bytes a few more bytes and a little slower, hardly anything to get emotional about. Especially for the problem cited. -- Regards, Tom Ogilvy "Frank Kabel" wrote in message ... Bob of course correct, somehow forgot that.... -- Regards Frank Kabel Frankfurt, Germany "Bob Phillips" schrieb im Newsbeitrag ... Please! wbk should be declared as an object, not variant<vbg Bob "Frank Kabel" wrote in message ... Hi not tested but try Dim oApp as Object Dim wbk intCount as Integer Set oApp = CreateObject("Excel.Application") set wbk = oApp.Workbooks.Open("C:\Test.xls") intcount = wbk.worksheets.count -- Regards Frank Kabel Frankfurt, Germany "M" schrieb im Newsbeitrag ... Using the code: Dim oApp as Object intCount as Integer Set oApp = CreateObject("Excel.Application") oApp.Workbooks.Open("C:\Test.xls") to open a .xls with late binding, what would I use to count the worksheets? And I'm having to use late binding to avoid reference issues and cannot use early binding. (Thanks to our IT Dept.) Thanks M |
Reply |
Thread Tools | Search this Thread |
Display Modes | |
|
|
![]() |
||||
Thread | Forum | |||
late binding in excel | Excel Programming | |||
Late Binding | Excel Programming | |||
Late Binding | Excel Programming | |||
EARLY binding or LATE binding ? | Excel Programming | |||
DAO Late Binding? | Excel Programming |