Add a form onto a macro - Need help ASAP

  • Thread starter Thread starter TMO
  • Start date Start date
T

TMO

Hi

I have made a database and I have a list of customers, what I want to
do is for the user to be able to add new customers via through a form
(go to data then form on excel 2000), how would I connect this up?
every time I try it says there is a bug and I cannot seem to unbug it,
maybe I am typing something wrong.

This is what I currently have typed:

Sub addnewcustomer()
'
' addnewcustomer Macro
' Macro recorded 12/13/2003 by TMO
'

'
Range("C5:L23").Select
ActiveSheet.ShowDataForm
End Sub

Is this right?

Also, how would I connect a macro to make the page print?

Also, can you add password onto excel? if so how.

Hope you guys can help me, thanks.
 
Sub addnewcustomer()
'
' addnewcustomer Macro
' Macro recorded 12/13/2003 by TMO
'

'
Range("C5:L23").CurrentRegion.Name = "Database"
ActiveSheet.ShowDataForm
End Sub

Should work.

Regards,
Tom Ogilvy
 
Thanks man, your a life saver, it worked :)

Tell me how can I add a printer to a macro?

Also can I make a password login in excel?

Thanks people :)
 
Back
Top