Update Excel Objects

  • Thread starter Thread starter computers hate me
  • Start date Start date
C

computers hate me

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
 
Exactly which line of your code gives an error? That will help to diagnose
the problem.
 
for the first line
commandButton2_Click

Barb Reinhardt said:
Exactly which line of your code gives an error? That will help to diagnose
the problem.
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Back
Top