Problem with a button to copy inputs into a database
-
Hello and for your time. I am trying to program a button on anworksheet (in Excel 2003) that is designed to work as a data entry form. There are three sheets in the worksheet: a pretty looking page where data is entered by the user (basic info & results), a page where entries on the first page are mirrored into one row (temp database), and a page where I would like the data to be stored (central database). I have tried numerous times to record a macro for the button which copies the line of input data from the temp database and inserts it into the central database. In all my attempts, I have recieved error messages. The latest looked like this: Sub submittake100() ' ' submittake100 Macro ' Macro recorded 7/6/2010 by Adam O'Neill ' ' Sheets("temp database").Select Range("A2:GN2").Select Selection.Copy Sheets("central database").Select ActiveWindow.SmallScroll Down:=-9 Range("A2:GS2").Select Selection.Insert Shift:=xlDown Sheets("Basic info & results").Select End Sub Originally I was trying to cut and insert the data as that would serve the dual function of clearing the fields on the form as well. I am currently in China and have access to neither englishbooks nor most of the tutorials which are on youtube (the great firewall). I have no programming skills, but wouldn't mind learning someVBA. Any help you can offer is very much appreciated. Thank you again.
-
Answer:
The code itself looks fine, but you haven't told me the error message - a streamlined version of the code which never changes the selection is Sub akk() Sheets("temp database").Range("A2:GS2").Copy Sheets("central database").Range("A2:GS2").Insert Shift:=xlDown End Sub If you can let me know where you are having errors I can try to help further, and if it helps my direct email is [email protected]
Miningco.com Visit the source
Related Q & A:
- How do you pause a program until a button is pressed in JAVA?Best solution by Stack Overflow
- How to match a drawn Chinese character to a database of stroke animations?Best solution by Signal Processing
- How To Click A Button In A Popup?Best solution by Stack Overflow
- How to add a button in a Fragment?Best solution by Stack Overflow
- How good is a career as a Database Administrator?Best solution by Yahoo! Answers
Just Added Q & A:
- How many active mobile subscribers are there in China?Best solution by Quora
- How to find the right vacation?Best solution by bookit.com
- How To Make Your Own Primer?Best solution by thekrazycouponlady.com
- How do you get the domain & range?Best solution by ChaCha
- How do you open pop up blockers?Best solution by Yahoo! Answers
For every problem there is a solution! Proved by Solucija.
-
Got an issue and looking for advice?
-
Ask Solucija to search every corner of the Web for help.
-
Get workable solutions and helpful tips in a moment.
Just ask Solucija about an issue you face and immediately get a list of ready solutions, answers and tips from other Internet users. We always provide the most suitable and complete answer to your question at the top, along with a few good alternatives below.