View Single Post
  #3   Report Post  
Posted to microsoft.public.excel.programming
ruff ruff is offline
external usenet poster
 
Posts: 4
Default Setting .OnAction of a command button terminates my macro.....

Hi Norman,

Here is the full code:

Sub Splash_Screen()

Sheets.Add befo=Sheets(1)
Sheets(1).Name = "Navigation"
Cells.Select
With Selection.Interior
.ColorIndex = 15
.Pattern = xlSolid
End With

ActiveSheet.Buttons.Add(50, 50, 100, 50).Name = "Survey"
ActiveSheet.Buttons("Survey").Caption = "Survey"
ActiveSheet.Buttons("Survey").OnAction = "SCI"

ActiveSheet.Buttons.Add(200, 50, 100, 50).Name = "Prices"
ActiveSheet.Buttons("Survey").Caption = "Prices"
ActiveSheet.Buttons("Survey").OnAction = "Prices"

Range("A1").Select

End Sub