View Single Post
  #1   Report Post  
Posted to microsoft.public.excel.programming
jordanctc[_21_] jordanctc[_21_] is offline
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