Home |
Search |
Today's Posts |
|
#1
![]()
Posted to microsoft.public.excel.programming
|
|||
|
|||
![]() Still struggling with this one, i keep getting variable not defined o oWBAudit. If i do get this to run at all i get the error 424 an oWBAudit = empty and Nothing=Nothing. I have put the code in the this workbook module with the initia statement If oWBaudit Is Nothing Then Set oWBaudit = Workbooks.Open(FileName:="C:\Audit\Tracking.xls") End If at the top and the rest at the bottom of the code, any ideas? Simo -- Simon Lloy ----------------------------------------------------------------------- Simon Lloyd's Profile: http://www.excelforum.com/member.php...nfo&userid=670 View this thread: http://www.excelforum.com/showthread.php?threadid=26636 |
#2
![]()
Posted to microsoft.public.excel.programming
|
|||
|
|||
![]()
if you
dim oWBAudit (will set it as a variant) to test if a variant is initialized you check if myVariant = Empty or if IsEmpty(MyVariant) dim oWBAudit as object dim oWBAudit as workbook (will dim it as a "general" object resp a workbook object to test is an object is initialized you check if myObject IS nothing also note the distinction between "=" and "IS" IS is used to compare objects. keepITcool < email : keepitcool chello nl (with @ and .) < homepage: http://members.chello.nl/keepitcool Simon Lloyd wrote: Still struggling with this one, i keep getting variable not defined on oWBAudit. If i do get this to run at all i get the error 424 and oWBAudit = empty and Nothing=Nothing. I have put the code in the this workbook module with the initial statement If oWBaudit Is Nothing Then Set oWBaudit = Workbooks.Open(FileName:="C:\Audit\Tracking.xls") End If at the top and the rest at the bottom of the code, any ideas? Simon |
Reply |
Thread Tools | Search this Thread |
Display Modes | |
|
|
![]() |
||||
Thread | Forum | |||
Row and Column identifier tabs now showing on sheet 1 | Setting up and Configuration of Excel | |||
Duplicate sheet, autonumber sheet, record data on another sheet | Excel Worksheet Functions | |||
Formula that will record the time and date when an entry is made on a sheet | Excel Worksheet Functions | |||
How to record a sheet change showing row column sheet name and date? | Excel Programming | |||
How to record a sheet change showing row column sheet name and date? | Excel Programming |