Need to Create Macros so that it can copy data to the next row....

O

ominxs

#1
Need to create macros so that it can copy data to the next row every time the form is submitted

Missing on some steps

ub Submitform()
'
' Submitform Macro
'
'
Sheets("Dump").Select
Range("A51").Select
Range(Selection, Selection.End(xlToRight)).Select
Selection.Copy
ActiveWindow.SmallScroll Down:=-36
ActiveWindow.ScrollColumn = 23
ActiveWindow.ScrollColumn = 22
ActiveWindow.ScrollColumn = 21
ActiveWindow.ScrollColumn = 20
ActiveWindow.ScrollColumn = 18
ActiveWindow.ScrollColumn = 17
ActiveWindow.ScrollColumn = 15
ActiveWindow.ScrollColumn = 13
ActiveWindow.ScrollColumn = 11
ActiveWindow.ScrollColumn = 8
ActiveWindow.ScrollColumn = 6
ActiveWindow.ScrollColumn = 3
ActiveWindow.ScrollColumn = 1
ActiveWindow.SmallScroll Down:=-15

ActiveWindow.SmallScroll Down:=18
Range("A2").Select
Selection.PasteSpecial Paste:=xlPasteValues, Operation:=xlNone, SkipBlanks _
:=False, Transpose:=False

Range("a2").Offset(1, 0).PasteSpecial
End Sub

Need help
 
Elsmar Forum Sponsor
S

somerqc

#2
If this is in excel or word use the "record macro" function to compare the result to what you have already programmed to see what the issue is.

At least this will give you a macro that works and YOU will be able to learn from whatever it was that is causing your macro to not work.
 
H

Hodgepodge

#4
Need to create macros so that it can copy data to the next row every time the form is submitted

Missing on some steps

ub Submitform()
'
' Submitform Macro
'
'
Sheets("Dump").Select
Range("A51").Select
Range(Selection, Selection.End(xlToRight)).Select
Selection.Copy
ActiveWindow.SmallScroll Down:=-36
ActiveWindow.ScrollColumn = 23
ActiveWindow.ScrollColumn = 22
ActiveWindow.ScrollColumn = 21
ActiveWindow.ScrollColumn = 20
ActiveWindow.ScrollColumn = 18
ActiveWindow.ScrollColumn = 17
ActiveWindow.ScrollColumn = 15
ActiveWindow.ScrollColumn = 13
ActiveWindow.ScrollColumn = 11
ActiveWindow.ScrollColumn = 8
ActiveWindow.ScrollColumn = 6
ActiveWindow.ScrollColumn = 3
ActiveWindow.ScrollColumn = 1
ActiveWindow.SmallScroll Down:=-15

ActiveWindow.SmallScroll Down:=18
Range("A2").Select
Selection.PasteSpecial Paste:=xlPasteValues, Operation:=xlNone, SkipBlanks _
:=False, Transpose:=False

Range("a2").Offset(1, 0).PasteSpecial
End Sub

Need help
Attach the form (or a copy safe for attaching) and/or describe in as much detail as possible exactly what it is you are trying to accomplish and I'll take a look at it.
 
S

staftrax

#5
Hi,
I have a macro that will place the data on the next available empty row on a spreadsheet.
below is a copy of something I'm working on at the moment as an example. If you need any help let me know.


Sub datacarrier()
'
' datacarrier Macro
' Macro recorded 16/07/2010 by staftrax
'
Application.ScreenUpdating = False
Application.DisplayAlerts = False
Sheets("flatfile").Select
Range("a2").Select
Do
If IsEmpty(ActiveCell) = False Then
ActiveCell.Offset(1, 0).Select
End If
Loop Until IsEmpty(ActiveCell) = True
ActiveCell.Value = Now()
ActiveCell.Offset(0, 1) = Now()
ActiveCell.Offset(0, 2) = Now()
ActiveCell.Offset(0, 3) = Now()
ActiveCell.Offset(0, 4) = Now()
ActiveCell.Offset(0, 5) = Now()
ActiveCell.Offset(0, 6) = Sheets("input").ListBox1
ActiveCell.Offset(0, 7) = Sheets("input").TextBox1
ActiveCell.Offset(0, 8) = Sheets("input").TextBox2
ActiveCell.Offset(0, 9) = Sheets("input").DTPicker1
ActiveCell.Offset(0, 13) = Sheets("input").ListBox5
ActiveCell.Offset(0, 18) = Sheets("input").ListBox3
ActiveCell.Offset(0, 19) = Sheets("input").ListBox4
ActiveCell.Offset(0, 20) = Sheets("input").DTPicker2

ActiveCell.Offset(0, 26) = Sheets("input").ListBox2
Range("A1").Select
Sheets("input").Select
Application.ScreenUpdating = True
End Sub
 
T

tomvehoski

#6
If you are using forms for data entry, you might want to look at Access for the entry. Much easier to deal with IMO, and you can export/link to Excel if you need to perform complicated analysis that Access is not all that good at.
 
Thread starter Similar threads Forum Replies Date
M Do we need to create a new CER or can we just update the existing CER EU Medical Device Regulations 3
Q Medical Device with Lead (Pb) - Do I need to create an MSDS sheet? Other US Medical Device Regulations 1
C Need help to create tracking tool Excel .xls Spreadsheet Templates and Tools 4
J Is there a need to create a "Contract Review" checklist or document? Contract Review Process 19
U Need Help With API Q2 Quality Manual Oil and Gas Industry Standards and Regulations 5
S In Need of GIDEP Guidance AS9100, IAQG, NADCAP and Aerospace related Standards and Requirements 3
M Do employee training records need to be controlled documents? AS9100, IAQG, NADCAP and Aerospace related Standards and Requirements 4
D What evidence to I need to supply as a remote location in relation to manufacturing sites? IATF 16949 - Automotive Quality Systems Standard 10
T Non API products need to comply to API Q1? Oil and Gas Industry Standards and Regulations 3
G Need journal and reference of abnormal bar chart SPC Statistical Analysis Tools, Techniques and SPC 4
MSeibert47 Daily Quality Topics - Need Ideas Please! Food Safety - ISO 22000, HACCP (21 CFR 120) 15
W Do Reference materials for IATF need to be 17025? IATF 16949 - Automotive Quality Systems Standard 15
D Need some Help on 8D fault tree analysis Problem Solving, Root Cause Fault and Failure Analysis 6
A Need to calculate tolerance Intervals with a set of non-normal data and 3-Parameter Weibull distribution Using Minitab Software 0
Melissa Risk Management Process, How far do I need to go? ISO 14971 - Medical Device Risk Management 10
F Need Quality Manager advice. Quality Manager and Management Related Issues 6
T Do we need an SOP for ISO 9001? ISO 9000, ISO 9001, and ISO 9004 Quality Management Systems Standards 9
B Do CTQs need to be equipment specific? FMEA and Control Plans 8
K Contract Manufacturer Do they need a complaint procedure? Medical Device and FDA Regulations and Standards News 8
K Screen printing ink and machine selection_ Need help Manufacturing and Related Processes 6
D Do employee training records need to be centralized? IATF 16949 - Automotive Quality Systems Standard 10
H Need of EU Representative Designation for Turkey? EU Medical Device Regulations 3
H If we use agile - do we still need to document TF as a waterfall just for the notified bodies need? IEC 62304 - Medical Device Software Life Cycle Processes 2
briteme4 AS9102 First Article Inspection - do I need a second reviewer and signer? AS9100, IAQG, NADCAP and Aerospace related Standards and Requirements 2
J Furnace repaired - Do I need a new initial TUS? AS9100, IAQG, NADCAP and Aerospace related Standards and Requirements 1
B Does FDA Registration QSR need to cover non-medical devices for contract repackager? US Food and Drug Administration (FDA) 1
S Need ISO 15189:2012 Documentation toolkit. Document Control Systems, Procedures, Forms and Templates 0
J Need a contract monitoring Tool General Information Resources 0
P UDI-PI requirements on reusable surgical device, do we need serialisation? ISO 13485:2016 - Medical Device Quality Management Systems 3
J Need Help with FPY Data in Assembly Process Manufacturing and Related Processes 7
W 17025 and NIST handbook relationship (need advice) ISO 17025 related Discussions 8
lanley liao Does all of the suppliers need to integrated into the supplier list qualified of the company? Oil and Gas Industry Standards and Regulations 2
K Need procedure for D&D inputs? ISO 13485:2016 - Medical Device Quality Management Systems 4
S Need help on "Country of Origin" Medical Device and FDA Regulations and Standards News 0
Ed Panek Immediate need for 80601-2-56 Consulting expert. PM me for details Career and Occupation Discussions 0
Tagin You're Gonna Need a Bigger Root Cause Coffee Break and Water Cooler Discussions 12
M PSA Suppliers - CSR matrix and need the quality manual of PSA APQP and PPAP 6
M Need Help With Information Security Asset Risk Register IEC 27001 - Information Security Management Systems (ISMS) 2
K Interesting Discussion "World Class Product" based QM. I need advice. Quality Management System (QMS) Manuals 14
I Do I need to sign off my annual audit calendar? Internal Auditing 2
P Do we need to retrospectively use the "MD" symbol (indicating device is a medical device) on labels, e.g. finished devices within expiration date? EU Medical Device Regulations 2
M Do I need separation in my circuit with a medical charger? IEC 60601 - Medical Electrical Equipment Safety Standards Series 0
V Certified Auditor - Need of additional certification specific to industry ( GMPs) ASQ vs ECA vs others Professional Certifications and Degrees 1
D Low risk IVD study in the UK, do I need MHRA approval? UK Medical Device Regulations 1
A Medical Device Contract Manufacturer - Does the CM need to register with FDA? 21 CFR Part 820 - US FDA Quality System Regulations (QSR) 3
J Records Control - Does each individual record need to be numbered? Records and Data - Quality, Legal and Other Evidence 2
N Is there a need for clinical test of Class IIa products (for MDR)? EU Medical Device Regulations 2
J Do Software Subcontractors need to be ISO13485 compliant in the EU? EU Medical Device Regulations 3
K Do I need a "State of the art" plan? CE Marking (Conformité Européene) / CB Scheme 1
S Need advice for schooling Quality Manager and Management Related Issues 5

Similar threads

Top Bottom