Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 60
Default Format(Time, "h.mm AM/PM") question

Here is the code:

'This is the name of the workbook with transferred data. This allows a
date/time stamp in the name.
wbname = "TERData " & Format(Date, "mm-dd-yyyy") & " " & Format(Time,
"h.mm AM/PM")

It stops on the word: TIME. why? This has worked for weeks and today it
stopped working. I can't see anything that I changed in this line that would
affect the outcome except I moved the code from a private open workbook macro
into my private stash to test the email functionality on select memebers of
my team.

Here is a section of my log that also captures date and time the same way.
You can see how the code use to work and now doesn't as the time switches to
12am and doesn't move forward:

TERData 42 7/5/2006 8:54:39 AM
TERData 43 7/5/2006 8:55:16 AM
TERData 44 7/5/2006 12:00:00 AM
TERData 45 7/5/2006 12:00:00 AM
TERData 46 7/5/2006 12:00:00 AM

  #2   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 10,593
Default Format(Time, "h.mm AM/PM") question

You haven't created a variable called TIME have you?

Another thing to try. In the VBIDE, go to ToolsReferences. If there are any
items with MISSING in the text, uncheck them.

--
HTH

Bob Phillips

(replace somewhere in email address with gmail if mailing direct)

"Nicole Seibert" wrote in message
...
Here is the code:

'This is the name of the workbook with transferred data. This allows

a
date/time stamp in the name.
wbname = "TERData " & Format(Date, "mm-dd-yyyy") & " " & Format(Time,
"h.mm AM/PM")

It stops on the word: TIME. why? This has worked for weeks and today it
stopped working. I can't see anything that I changed in this line that

would
affect the outcome except I moved the code from a private open workbook

macro
into my private stash to test the email functionality on select memebers

of
my team.

Here is a section of my log that also captures date and time the same way.
You can see how the code use to work and now doesn't as the time switches

to
12am and doesn't move forward:

TERData 42 7/5/2006 8:54:39 AM
TERData 43 7/5/2006 8:55:16 AM
TERData 44 7/5/2006 12:00:00 AM
TERData 45 7/5/2006 12:00:00 AM
TERData 46 7/5/2006 12:00:00 AM



  #3   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 60
Default Format(Time, "h.mm AM/PM") question

No, I didn't create a variable called time. I checked my reference for
"missing" entries and found none. And interestingly enough the error message
I get states:

"Compile error: expected function or variable"

"Bob Phillips" wrote:

You haven't created a variable called TIME have you?

Another thing to try. In the VBIDE, go to ToolsReferences. If there are any
items with MISSING in the text, uncheck them.

--
HTH

Bob Phillips

(replace somewhere in email address with gmail if mailing direct)

"Nicole Seibert" wrote in message
...
Here is the code:

'This is the name of the workbook with transferred data. This allows

a
date/time stamp in the name.
wbname = "TERData " & Format(Date, "mm-dd-yyyy") & " " & Format(Time,
"h.mm AM/PM")

It stops on the word: TIME. why? This has worked for weeks and today it
stopped working. I can't see anything that I changed in this line that

would
affect the outcome except I moved the code from a private open workbook

macro
into my private stash to test the email functionality on select memebers

of
my team.

Here is a section of my log that also captures date and time the same way.
You can see how the code use to work and now doesn't as the time switches

to
12am and doesn't move forward:

TERData 42 7/5/2006 8:54:39 AM
TERData 43 7/5/2006 8:55:16 AM
TERData 44 7/5/2006 12:00:00 AM
TERData 45 7/5/2006 12:00:00 AM
TERData 46 7/5/2006 12:00:00 AM




  #4   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 225
Default Format(Time, "h.mm AM/PM") question

This might not help the problem, but you can simplify the
code slightly by writing:

wbname = "TERData " & Format(Now, "mm-dd-yyyy h.mm AM/PM")




Nicole Seibert wrote:
No, I didn't create a variable called time. I checked my reference for
"missing" entries and found none. And interestingly enough the error message
I get states:

"Compile error: expected function or variable"

"Bob Phillips" wrote:

You haven't created a variable called TIME have you?

Another thing to try. In the VBIDE, go to ToolsReferences. If there are any
items with MISSING in the text, uncheck them.

--
HTH

Bob Phillips

(replace somewhere in email address with gmail if mailing direct)

"Nicole Seibert" wrote in message
...
Here is the code:

'This is the name of the workbook with transferred data. This allows

a
date/time stamp in the name.
wbname = "TERData " & Format(Date, "mm-dd-yyyy") & " " & Format(Time,
"h.mm AM/PM")

It stops on the word: TIME. why? This has worked for weeks and today it
stopped working. I can't see anything that I changed in this line that

would
affect the outcome except I moved the code from a private open workbook

macro
into my private stash to test the email functionality on select memebers

of
my team.

Here is a section of my log that also captures date and time the same way.
You can see how the code use to work and now doesn't as the time switches

to
12am and doesn't move forward:

TERData 42 7/5/2006 8:54:39 AM
TERData 43 7/5/2006 8:55:16 AM
TERData 44 7/5/2006 12:00:00 AM
TERData 45 7/5/2006 12:00:00 AM
TERData 46 7/5/2006 12:00:00 AM





  #5   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 60
Default Format(Time, "h.mm AM/PM") question

Thank you Andrew.

"Andrew Taylor" wrote:

This might not help the problem, but you can simplify the
code slightly by writing:

wbname = "TERData " & Format(Now, "mm-dd-yyyy h.mm AM/PM")




Nicole Seibert wrote:
No, I didn't create a variable called time. I checked my reference for
"missing" entries and found none. And interestingly enough the error message
I get states:

"Compile error: expected function or variable"

"Bob Phillips" wrote:

You haven't created a variable called TIME have you?

Another thing to try. In the VBIDE, go to ToolsReferences. If there are any
items with MISSING in the text, uncheck them.

--
HTH

Bob Phillips

(replace somewhere in email address with gmail if mailing direct)

"Nicole Seibert" wrote in message
...
Here is the code:

'This is the name of the workbook with transferred data. This allows
a
date/time stamp in the name.
wbname = "TERData " & Format(Date, "mm-dd-yyyy") & " " & Format(Time,
"h.mm AM/PM")

It stops on the word: TIME. why? This has worked for weeks and today it
stopped working. I can't see anything that I changed in this line that
would
affect the outcome except I moved the code from a private open workbook
macro
into my private stash to test the email functionality on select memebers
of
my team.

Here is a section of my log that also captures date and time the same way.
You can see how the code use to work and now doesn't as the time switches
to
12am and doesn't move forward:

TERData 42 7/5/2006 8:54:39 AM
TERData 43 7/5/2006 8:55:16 AM
TERData 44 7/5/2006 12:00:00 AM
TERData 45 7/5/2006 12:00:00 AM
TERData 46 7/5/2006 12:00:00 AM






Reply
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
I need calculated time in a "real number" format MRH Excel Worksheet Functions 2 February 12th 09 05:48 PM
Excel - Golf - how to display "-2" as "2 Under" or "4"as "+4" or "4 Over" in a calculation cell Steve Kay Excel Discussion (Misc queries) 2 August 8th 08 01:54 AM
How can I format elapsed time as "[mm]: ss" without getting "AM PM NavyPianoMan Excel Discussion (Misc queries) 10 August 28th 07 09:02 AM
"Disk is Full" add-on question to "Can't reset last cell" post tod [email protected] Excel Discussion (Misc queries) 0 January 22nd 07 02:32 AM
Scroll Bar missing "Control" tab in "Format Properties" dialog box Peter Rooney Excel Discussion (Misc queries) 5 August 24th 06 05:36 PM


All times are GMT +1. The time now is 08:33 AM.

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

About Us

"It's about Microsoft Excel"