Marius Nielsen
New Member
- Joined
- Feb 12, 2014
- Messages
- 10
I'm quite new to VBA and have a code which is not working correctly. Its working for a singel cell but not multiple cells selections.
Please note that selcted cells to be copied are merged cells so wonder if this is causing the issue.
Sub Main()
Call Nummber
Call Mail_ActiveSheet
Dim NextRow As Range
With Sheets("Database")
Set NextRow = .Cells(.Rows.Count, 2).End(xlUp).Offset(1, 0)
End With
ThisWorkbook.Sheets("Ocean Export FCL").Range("e6,e5,e2,e1,e3,e4,e7,t2,t3,t4,af4,t5,t6,af6,ad19,y27").Copy
NextRow.PasteSpecial Paste:=xlValues, Transpose:=True
Application.CutCopyMode = False
Set NextRow = Nothing
ThisWorkbook.Save
Application.Quit
End Sub
Any chance for some help on this issue ? Thanks in advance.
Please note that selcted cells to be copied are merged cells so wonder if this is causing the issue.
Sub Main()
Call Nummber
Call Mail_ActiveSheet
Dim NextRow As Range
With Sheets("Database")
Set NextRow = .Cells(.Rows.Count, 2).End(xlUp).Offset(1, 0)
End With
ThisWorkbook.Sheets("Ocean Export FCL").Range("e6,e5,e2,e1,e3,e4,e7,t2,t3,t4,af4,t5,t6,af6,ad19,y27").Copy
NextRow.PasteSpecial Paste:=xlValues, Transpose:=True
Application.CutCopyMode = False
Set NextRow = Nothing
ThisWorkbook.Save
Application.Quit
End Sub
Any chance for some help on this issue ? Thanks in advance.