LinkBack Thread Tools Search this Thread Display Modes
Prev Previous Post   Next Post Next
  #1   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 236
Default Variable Date vs variant

Hi,

I've built a ws for data storing (60 or so columns) and also I've
incorporated as if an audit trail. It works something like this - if a
value gets changed, it calls a procedure that passes variables
(oldVal, newVal) and calls auditTrail procedu

sub auditTrail (oldVal, newVal)

worksheets("AuditTrail").cells(x, oldVal_COL)=oldVal
worksheets("AuditTrail").cells(x, newVal_COL)=newVal

end sub

I haven't declared the variable (oldVal, newVal) types on purpose as
they can be anything from String, to Double, to Date.
And that's why my question - how should I grab the variables from the
calling procedure - either as
..value [gues not]
..text
..value2
or with just specifying range (i.e., without .value or .text etc.)?

I'm just concerned that i might run into errors of having March 12
treated as Dec 03 instead.

Any suggestions how these should be handled?
Thanks,
 
Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Posting Rules

Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On


Similar Threads
Thread Thread Starter Forum Replies Last Post
add 1 day to date variable DaveMZ[_2_] Excel Programming 1 April 10th 07 05:50 PM
Setting a Date variable scott Excel Programming 4 January 28th 05 01:12 AM
Eliminating duplicates from a variant variable smokiibear Excel Programming 1 December 21st 04 11:38 PM
calc constant date from variable date & return with ability to rn. SusieQ'sQuest Excel Worksheet Functions 1 November 9th 04 08:51 PM
Compare Date in Cell VS a Variable Date to Hide Row JimI Excel Programming 3 October 10th 04 04:26 PM


All times are GMT +1. The time now is 03:37 AM.

Powered by vBulletin® Copyright ©2000 - 2025, Jelsoft Enterprises Ltd.
Copyright ©2004-2025 ExcelBanter.
The comments are property of their posters.
 

About Us

"It's about Microsoft Excel"