darrylbster
New Member
- Joined
- Aug 8, 2016
- Messages
- 42
Good afternoon all.
I've been playing with VBA, brand new to it and having fun, but I can't figure something out...naturally.
I want to use a commandbutton to run a Macro, seelct the row of the current cell, copy it, jump to the first available blank row, paste contents.
This is what I have...
Private Sub CommandButton1_Click()
If I remove step two it does what I was expecting, no issues. AS soon as I add step two I get a Compile Error, invalid use of property.
I was getting the same kind of issue jumping rows, I was initially trying "ActiveCell.EntireRow.Offset(1, 0).Cells(1).EntireRow.Select" and it did not work, once I reworded it I found positive results. It seems as is nothig I'm doing is changing the fact that .Hidden is invalid.
I am assuming there is a work around?
I've been playing with VBA, brand new to it and having fun, but I can't figure something out...naturally.
I want to use a commandbutton to run a Macro, seelct the row of the current cell, copy it, jump to the first available blank row, paste contents.
This is what I have...
Private Sub CommandButton1_Click()
'Step1: select the erroneous row and copt the contents
ActiveCell.EntireRow.Copy
'Step2: Erroneous the erroneous row
Range(ActiveCell.EntireRow).Hidden
'Step3: Jump to the first available blank cell and paste contents from erronaous cell
Range("A" & Rows.Count).End(xlUp).Offset(1).Select
'Step4: Paste contents of Erroneous row
Paste
End Sub
If I remove step two it does what I was expecting, no issues. AS soon as I add step two I get a Compile Error, invalid use of property.
I was getting the same kind of issue jumping rows, I was initially trying "ActiveCell.EntireRow.Offset(1, 0).Cells(1).EntireRow.Select" and it did not work, once I reworded it I found positive results. It seems as is nothig I'm doing is changing the fact that .Hidden is invalid.
I am assuming there is a work around?