Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 1
Default How to submit data from one sheet to another with a macro and butt

I am doing a UI mockup and want to have a worksheet where data gets inputed
and then when the user is ready submits the data by clicking a button. At
this point the macro checks that all required fields have data (will
constrain the type using built in excel data type constraints) and enters it
into table on another sheet. When it enters the data in the table it enters
a new record and it creates a unique ID number in the table based on the
previous entries int value incrementing by 1.

I am looking for a short and sweet solution to this, if you have samples or
can point me at good ones I would be very grateful.
  #2   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 11,123
Default How to submit data from one sheet to another with a macro and butt

Use the counta function

Sub test()
Dim myrange As Range
Set myrange = Worksheets("Sheet1").Range("A1:Z1")
If Application.WorksheetFunction.CountA(myrange) < _
myrange.Cells.Count Then
MsgBox "fill in all cells"
Exit Sub
End If
MsgBox "Your code"
End Sub


See this page for the copy part
http://www.rondebruin.nl/copy1.htm


Post the code you are using and I help you with the unique ID number


--

Regards Ron de Bruin
http://www.rondebruin.nl/tips.htm


"Matt Brown" <Matt wrote in message ...
I am doing a UI mockup and want to have a worksheet where data gets inputed
and then when the user is ready submits the data by clicking a button. At
this point the macro checks that all required fields have data (will
constrain the type using built in excel data type constraints) and enters it
into table on another sheet. When it enters the data in the table it enters
a new record and it creates a unique ID number in the table based on the
previous entries int value incrementing by 1.

I am looking for a short and sweet solution to this, if you have samples or
can point me at good ones I would be very grateful.

Reply
Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Posting Rules

Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On


Similar Threads
Thread Thread Starter Forum Replies Last Post
Clear a set of combo boxes after a Submit of data to a new sheet. Jonah Excel Worksheet Functions 0 March 3rd 08 12:05 AM
Macro to automatically fill and submit (in batch) an online form fromdata in a excel sheet??? Christophe[_2_] Excel Discussion (Misc queries) 0 December 20th 07 07:57 AM
Excel Multisheets, submit button to update database sheet [email protected] Excel Discussion (Misc queries) 1 April 13th 07 02:26 PM
submit button in macro Jones E Excel Programming 2 April 26th 06 07:33 PM
Submit new data msnews.microsoft.com[_6_] Excel Programming 1 February 9th 04 06:07 PM


All times are GMT +1. The time now is 07:53 AM.

Powered by vBulletin® Copyright ©2000 - 2024, Jelsoft Enterprises Ltd.
Copyright ©2004-2024 ExcelBanter.
The comments are property of their posters.
 

About Us

"It's about Microsoft Excel"