ExcelBanter

ExcelBanter (https://www.excelbanter.com/)
-   Excel Programming (https://www.excelbanter.com/excel-programming/)
-   -   Add a form onto a macro - Need help ASAP (https://www.excelbanter.com/excel-programming/285351-add-form-onto-macro-need-help-asap.html)

TMO

Add a form onto a macro - Need help ASAP
 
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.


---
Message posted from http://www.ExcelForum.com/


Tom Ogilvy

Add a form onto a macro - Need help ASAP
 

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

TMO wrote in message
...
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.


---
Message posted from http://www.ExcelForum.com/




TMO[_2_]

Add a form onto a macro - Need help ASAP
 
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 :)


---
Message posted from http://www.ExcelForum.com/



All times are GMT +1. The time now is 05:24 PM.

Powered by vBulletin® Copyright ©2000 - 2025, Jelsoft Enterprises Ltd.
ExcelBanter.com