beartooth91
New Member
- Joined
- Dec 15, 2024
- Messages
- 9
- Office Version
- 365
- 2019
- 2016
- Platform
- Windows
Hello Everyone -
New to the forum, but have been writing VBA for several years.
I have what is likely a stupid question in regards to copying rows.....
See the two code snips below. They do not do the same thing and I don't understand why.
Specifically, the two range statements are different, but I can't figure out why they act different. May I ask someone here to explain?
Thanks
Dim c As Long
c = Workbooks("Master Database.xlsm").Worksheets("Inputs").Range("B" & Rows.Count).End(xlUp).Row
'
'Copy Point Name
'Workbooks("Master Database.xlsm").Worksheets("Inputs").Range("B11" & c).Copy '<-----doesn't work, copies a blank cell
-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------
'Copy Point Name
Workbooks("Master Database.xlsm").Worksheets("Inputs").Activate
Workbooks("Master Database.xlsm").Worksheets("Inputs").Range("B11", Range("B" & Rows.Count).End(xlUp)).Copy
New to the forum, but have been writing VBA for several years.
I have what is likely a stupid question in regards to copying rows.....
See the two code snips below. They do not do the same thing and I don't understand why.
Specifically, the two range statements are different, but I can't figure out why they act different. May I ask someone here to explain?
Thanks
Dim c As Long
c = Workbooks("Master Database.xlsm").Worksheets("Inputs").Range("B" & Rows.Count).End(xlUp).Row
'
'Copy Point Name
'Workbooks("Master Database.xlsm").Worksheets("Inputs").Range("B11" & c).Copy '<-----doesn't work, copies a blank cell
-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------
'Copy Point Name
Workbooks("Master Database.xlsm").Worksheets("Inputs").Activate
Workbooks("Master Database.xlsm").Worksheets("Inputs").Range("B11", Range("B" & Rows.Count).End(xlUp)).Copy