![]() |
Update Excel Objects
I am trying to set up an autoupdate button but I dont know how to set it to
update one of my macros becasue its under objects. My macro looks like this Sub update_all() CommandButton2_Click calculation copy calc NewAlarms End Sub Sub updater() MsgBox ("Update is set.") Cells(3, 1) = "update is set" Dim updatet As String updatet = TimeValue("10:40:00") Cells(3, 2) = updatet Application.OnTime TimeValue(updatet), "update_all" End Sub CommandButton2_Click is under the microsoft objects and its a Private Sub the other four are modules. If i run the macro without the commandButton2_Click it updates it but as soon as i put that in an error appears Compile error Sub or Function not sdefined |
Update Excel Objects
Exactly which line of your code gives an error? That will help to diagnose
the problem. -- HTH, Barb Reinhardt "computers hate me" wrote: I am trying to set up an autoupdate button but I dont know how to set it to update one of my macros becasue its under objects. My macro looks like this Sub update_all() CommandButton2_Click calculation copy calc NewAlarms End Sub Sub updater() MsgBox ("Update is set.") Cells(3, 1) = "update is set" Dim updatet As String updatet = TimeValue("10:40:00") Cells(3, 2) = updatet Application.OnTime TimeValue(updatet), "update_all" End Sub CommandButton2_Click is under the microsoft objects and its a Private Sub the other four are modules. If i run the macro without the commandButton2_Click it updates it but as soon as i put that in an error appears Compile error Sub or Function not sdefined |
Update Excel Objects
for the first line
commandButton2_Click "Barb Reinhardt" wrote: Exactly which line of your code gives an error? That will help to diagnose the problem. -- HTH, Barb Reinhardt "computers hate me" wrote: I am trying to set up an autoupdate button but I dont know how to set it to update one of my macros becasue its under objects. My macro looks like this Sub update_all() CommandButton2_Click calculation copy calc NewAlarms End Sub Sub updater() MsgBox ("Update is set.") Cells(3, 1) = "update is set" Dim updatet As String updatet = TimeValue("10:40:00") Cells(3, 2) = updatet Application.OnTime TimeValue(updatet), "update_all" End Sub CommandButton2_Click is under the microsoft objects and its a Private Sub the other four are modules. If i run the macro without the commandButton2_Click it updates it but as soon as i put that in an error appears Compile error Sub or Function not sdefined |
All times are GMT +1. The time now is 05:23 PM. |
Powered by vBulletin® Copyright ©2000 - 2025, Jelsoft Enterprises Ltd.
ExcelBanter.com