View Single Post
  #1   Report Post  
Posted to microsoft.public.excel.worksheet.functions
[email protected] alanglloyd@aol.com is offline
external usenet poster
 
Posts: 38
Default Macro Does not Work on Button

I have recorded a GoalSeek macro in Excel 97 SR2, which works when
called from the Tools | Macro menu, but when I call it from a button
on the spreadsheet then the macro fails in the GoalSeek command.

My macro is . . .

Sub BalancePC()
'
' BalancePC Macro
' Macro recorded 24/03/2009 by Alan G Lloyd
'

'
Worksheets("Financial Statement").Range("M37").GoalSeek _
Goal:=0, _
ChangingCell:=Worksheets("Financial Statement").Range("I25")

End Sub

Alan Lloyd