|
-
Mar 16th, 2009, 11:20 AM
#1
Thread Starter
Addicted Member
Possible intermittent problem ?
Dim strThisTime As String
strThisTime = Format(Now, "mm_dd_yyyy_____Hh_mm_ss")
Is there any possibility that strThisTime needs to be declared as a variant instead of a string ? Doesn't the use of Format() make it work ok ? When I say possibility, I mean it works 50 or 60 times, but on the 61st time the routine is called, the file name is bad ?
NOTE: strThisTime is used as a file name with & .txt appended as below.
Set txtfile = fso.CreateTextFile("C:\CES\XRF_Control\Data_Files\" & strThisTime & ".txt", True)
I'm getting an intermittent fatal error from the FSO. Error NO. -2147023446 ( Invalid code I believe )
Posting Permissions
- You may not post new threads
- You may not post replies
- You may not post attachments
- You may not edit your posts
-
Forum Rules
|
Click Here to Expand Forum to Full Width
|