View Single Post
  #2   Report Post  
Posted to microsoft.public.excel.programming
Barb Reinhardt Barb Reinhardt is offline
external usenet poster
 
Posts: 3,355
Default 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