View Single Post
  #3   Report Post  
Posted to microsoft.public.excel.programming
sparkes84 sparkes84 is offline
external usenet poster
 
Posts: 3
Default Trying to copy data to a new sheet and row in

Hi - thanks for your reply. I found some help via a link and have made this
work. My next problem is that I have tried to put a command button the page
where the data entry occurs to run the macro but it comes up with a message
saying Object Required. I don't understand it! When I run my macro, it is
called Sheet1.RemoveThem . My programming is as follows - any ideas??

Private Sub CommandButton1_Click()
On Error GoTo Err_Command1_Click

Dim stMacroName As String

stMacroName = "Sheet1.Removethem"
DoCmd.RunMacro stMacroName

Exit_Command1_Click:
Exit Sub

Err_Command1_Click:
MsgBox Err.Description
Resume Exit_Command1_Click

End Sub