ExcelBanter

ExcelBanter (https://www.excelbanter.com/)
-   Excel Programming (https://www.excelbanter.com/excel-programming/)
-   -   How to record a sheet change showing row column sheet name and date? (https://www.excelbanter.com/excel-programming/312624-how-record-sheet-change-showing-row-column-sheet-name-date.html)

Simon Lloyd[_580_]

How to record a sheet change showing row column sheet name and date?
 

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


keepITcool

How to record a sheet change showing row column sheet name and date?
 
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





All times are GMT +1. The time now is 06:26 PM.

Powered by vBulletin® Copyright ©2000 - 2025, Jelsoft Enterprises Ltd.
ExcelBanter.com