I am new to VBA and this website for inquiring a question. I am trying to have VBA automatically save 1 row of items (i.e. cells A1 and B1) to pdf document with it capturing cells A1 as the documents filename.pdf to a folder I have choose on my desktop. There are roughly 1800 rows, and therefore would allow for 1800 different pdfs with different names as the names would change from A1-A1800.
I have a code that automatically saves to pdf, however it is user defined for the naming and asks you what you would like to name for every file shown below, keep in mind this is setup for small file to test on before moving to 1800 items:
Sub TESTLOOPPRINT()
ActiveSheet.PageSetup.PrintArea = "$1:$2"
Rows("1:2").EntireRow.Hidden = True
For i = 1 to 2
Rows(i).EntireRow.Hidden = False
ChDir "C:\Users\ABB6632\Test\"
ActiveWindow.SelectedSheets.PrintOut Copies:=1, Collate:=True
Rows(i).EntireRow.Hidden = True
Next i
Rows("1:2").EntireRow.Hidden = False
End Sub