Question
Thread display: Collapse - |
All Answers
Start or search
Create a new discussion
If you're asking for technical help, please be sure to include all your system info, including operating system, model number, and any other specifics related to the problem. Also please exercise your best judgment when posting in the forums--revealing personal information such as your e-mail address, telephone number, and address is not recommended.
Excel 200 VBA code needed!
The other problem I'm having is that the buttons I have attached the macros to won't work since I've saved the file to a disk. I get a message saying that another file with the same name is already open.(which is not the case) How can I fix this? The macro will run in the VBA editor.
here is what I've got so far: (I get a syntax error at the line that should copy and paste to the blank line below
Sub enterdata()
'
' enterdata Macro
' Macro recorded 13/08/2008 by Marjorie McDonald
'
' Keyboard Shortcut: Ctrl+d
'Copies the data entered in the first row as values in the next blank row
'
'
'
' go to database sheet
'start at the currently selected cell
Sheets("Database").Select
x = ActiveCell.Row
'copy and paste this row as values to the next blank row below
Range(ActiveCell, ActiveCell.End(xlToRight)).Select.Copy _
Selection.PasteSpecial Paste:=xlPasteValues, Operation:=xlNone, SkipBlanks _
:=False, Transpose:=False
'Next Blank Cell Below
ActiveCell.Offset(1, 0).Select
Do While Not IsEmpty(ActiveCell)
ActiveCell.Offset(1, 0).Select
ActiveSheet.Paste
Application.CutCopyMode = False
Loop
End Sub
Thanks so much for any suggestions!