hi guys,
can someone please tell me what is wrong with this code:
I am getting on the line below.. i have commented out the line after the blue as I couldnt seem to get that to work either.
Sheets("Virtual Servers").Range("A:A").Copy Destination:=ThisWorkbook.Sheets("Templist").Range(NextRow)
i tried this also but didnt work
'ThisWorkbook.Sheets("Virtual Servers").Range("A" & NextRow).PasteSpecial Paste:=xlValues
The intention of this code should be clear, though I am basically copying all the cells in Phys servers WS in Col A to the Templist WS, then I wanted to find the last used row in Templist and, move 1 down, then copy the cells in Virt Servers WS.
'create new worksheet
Sheets.Add.Name = "Templist"
Sheets("Physical Servers").Select
'copy sheets "Physical Servers" contents to "Templist" WS
Sheets("Physical Servers").Range("A:A").Copy Destination:=ThisWorkbook.Sheets("Templist").Range("A1")
'Find last used row in Templist and + 1 to find next available row
Dim NextRow As Long
NextRow = ThisWorkbook.Sheets("Templist").Range("B65536").End(xlUp).Row + 1
'Copy data in Column A within the 'Virtual Servers' to 'Templist' WS
Sheets("Virtual Servers").Select
'copy sheets "Physical Servers" contents to "Templist" WS
Sheets("Virtual Servers").Range("A:A").Copy Destination:=ThisWorkbook.Sheets("Templist").Range(NextRow)
'ThisWorkbook.Sheets("Virtual Servers").Range("A" & NextRow).PasteSpecial Paste:=xlValues
Sheets("Templist").Select
'set unique filter
Range("A2:A65035").AdvancedFilter Action:=xlFilterInPlace, Unique:=True
Bookmarks