>I am using the "Application.ontimer" member of the excel library to call a Public Sub GetTime()
>I am getting the error "Cannot run the Macro "GetTime" May not be available in this workbook or all...."
>I've changed my security setting to "none" in Microstation XM, is there a place where I should look to see if macros are disabled? I am running other vba, with no >problem.
The security setting that I changed is in the Microstation environment, under Workspace-Security
I add a clock to a vba form in Excel using the application.ontimer like:
Public Sub GetTime()
Dim ID As Date
UFClock.clock =Format(Now, "mm/dd/yy hh:mm:ss")
ID = Now +TimeValue("00:00:0001")
UFClock.LastTime= ID
Application.OnTime ID, "GetTime"
End Sub
I wanted to do the same in microstation, but there isn't the Application.ontimer so I loaded the excel library and used excel.application.ontimer but it won't launch the "gettime" I've also tried "ufclock.gettime" .
I have the gettime in a module, but I've also tried it in the form programming as a private function.
any help is greatly appreciated.
It's still not clear which VBA you are using.
Does your GetTime() subroutine get called successfully if everything is written in Excel VBA?
In the snippet you posted, is GetTime() in Excel VBA or MicroStation VBA?
I don't think MicroStation security is relevant to your problem. Microsoft applications these days turn macros off by default because of security issues, but that doesn't apply to MicroStation.
MicroStation VBA does have a Timer function, by the way.
Regards, Jon Summers LA Solutions
The getTime() works fine in excel, but I could save gobs by using the timer function in Microstation. I couldn't find it.
Khubbard said:I could save gobs by using the timer function in MicroStation. I couldn't find it
Type Timer on a new line. Put your cursor in the word and press F1 to pop Microsoft help.
There are two help documents: one provided for MicroStation VBA and the other is the standard Microsoft VBA help, common to all implementations of VBA.