Home |
Search |
Today's Posts |
#1
![]()
Posted to microsoft.public.excel.programming
|
|||
|
|||
![]()
I have created a macro to isolate certain data based on a variable
loop. I would like to print the data to a pdf file. I was able to get it to print but it always uses the same filename; "Group" The following code in a k loop works to make fn$ the filename I desire; I checked it by sending the fn$ to sequential cells of a sheet. How can I get the pdf filename to change within the loop? Thanks for any help. Charlie s$ = Str(k) If k < 10 Then s$ = "0" & Right(s$, 1) Else s$ = Right(s$, 2) fn$ = "Group" & s$ & ".pdf" filename:=fn$ ActiveWindow.SelectedSheets.PrintOut Copies:=1 |
Thread Tools | Search this Thread |
Display Modes | |
|
|
![]() |
||||
Thread | Forum | |||
Macro to create PDF's question | Excel Discussion (Misc queries) | |||
VBA Script to Print several named ranges to PDF with cell-defined filenames | Excel Programming | |||
Macro for changing print settings | Excel Discussion (Misc queries) | |||
Linked excel charts, changing filenames generates exception | Excel Programming | |||
Changing filenames using theSaveAsCopy method | Excel Programming |