I am a newbie to Excel VBA. I have written a code with a command button procedure to write some data in another sheet name "EQ_STD_INP" say after clearing the old content in the EQ_STD_INP sheet I want to insert a text in B3 cell I want to know is there any way I could write the program without active sheet command at beginning of each command. Hera is my code.
Private Sub CommandButton2_Click()
'activate EQ_STD_INP
Worksheets("EQ_STD_INP").Activate
'celear cell contents in active sheet
ActiveSheet.Cells.ClearContents
'entering joint coordinate command to cell B3
ActiveSheet.Range("B3").Value = "JOINT COORDINATES"
End Sub