Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 1
Default VBA - MS VB Compile Error


Tom,

***I got it to do it again - This worked

Sub Trial1()
Range("A1").Value = Format(Now(), "m-dd-yyyy")
End Sub

***Then I added a macro named Format - this gave me the compile erro
when trying to run Trial1

Sub Trial1()
Range("A1").Value = Format(Now(), "m-dd-yyyy")
End Sub

Sub Format()
MsgBox "Now I'm messing with you"
End Sub

***Then I renamed Format to Format1 - this ran fine

Sub Trial1()
Range("A1").Value = Format(Now(), "m-dd-yyyy")
End Sub


Sub Format1()
MsgBox "Now I'm messing with you"
End Sub

And I might not have been clear but all computers were getting th
error today until I changed the macro name. Another behavior I notice
was when there was a macro named Format, when typing in "format(" th
property popup did not show.

Jorda

--
jordanct
-----------------------------------------------------------------------
jordanctc's Profile: http://www.excelforum.com/member.php...nfo&userid=676
View this thread: http://www.excelforum.com/showthread.php?threadid=26617

  #2   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 27,285
Default VBA - MS VB Compile Error

I don't question that that is the cause. It absolutely is. I was saying in
your original post you said

The following code was working on Friday but today on several computers
the VBA code has a big problem with the format function.


To me that comes across as "some" and not "all". In fact my purpose in
posting was to reinforce the fact that that is the problem. And perhaps a
little bit quizzical that it wasn't all computers - but you now confirm that
it was all computers - which is consistent with expectations.


--
Regards,
Tom Ogilvy

"jordanctc" wrote in message
...

Tom,

***I got it to do it again - This worked

Sub Trial1()
Range("A1").Value = Format(Now(), "m-dd-yyyy")
End Sub

***Then I added a macro named Format - this gave me the compile error
when trying to run Trial1

Sub Trial1()
Range("A1").Value = Format(Now(), "m-dd-yyyy")
End Sub

Sub Format()
MsgBox "Now I'm messing with you"
End Sub

***Then I renamed Format to Format1 - this ran fine

Sub Trial1()
Range("A1").Value = Format(Now(), "m-dd-yyyy")
End Sub


Sub Format1()
MsgBox "Now I'm messing with you"
End Sub

And I might not have been clear but all computers were getting the
error today until I changed the macro name. Another behavior I noticed
was when there was a macro named Format, when typing in "format(" the
property popup did not show.

Jordan


--
jordanctc
------------------------------------------------------------------------
jordanctc's Profile:

http://www.excelforum.com/member.php...fo&userid=6761
View this thread: http://www.excelforum.com/showthread...hreadid=266175



  #3   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 863
Default VBA - MS VB Compile Error

DO NOT USE RESERVED WORDS AS PROCEDURE OR VARIABLE NAMES!!! ('shouting'
intended <g)

On Mon, 4 Oct 2004 15:26:30 -0500, jordanctc
wrote:


Tom,

***I got it to do it again - This worked

Sub Trial1()
Range("A1").Value = Format(Now(), "m-dd-yyyy")
End Sub

***Then I added a macro named Format - this gave me the compile error
when trying to run Trial1

Sub Trial1()
Range("A1").Value = Format(Now(), "m-dd-yyyy")
End Sub

Sub Format()
MsgBox "Now I'm messing with you"
End Sub

***Then I renamed Format to Format1 - this ran fine

Sub Trial1()
Range("A1").Value = Format(Now(), "m-dd-yyyy")
End Sub


Sub Format1()
MsgBox "Now I'm messing with you"
End Sub

And I might not have been clear but all computers were getting the
error today until I changed the macro name. Another behavior I noticed
was when there was a macro named Format, when typing in "format(" the
property popup did not show.

Jordan


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
help with this error-Compile error: cant find project or library JackR Excel Discussion (Misc queries) 2 June 10th 06 09:09 PM
VBA Error Message "Compile Error...." Steve Excel Discussion (Misc queries) 3 July 15th 05 09:20 AM
How do I get rid of "Compile error in hidden module" error message David Excel Discussion (Misc queries) 4 January 21st 05 11:39 PM
Compile error in hidden module error Melissa Zebrowski Excel Programming 3 February 20th 04 01:29 PM


All times are GMT +1. The time now is 11:39 PM.

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"