timetabler
New Member
- Joined
- Jun 15, 2010
- Messages
- 27
Using existing list of classes, which are named in the format: 8A/Cp or 13W/Ma. I can print dynamic class lists for our teachers
My existing code works well for printing, but because of the "/" (which we can't change) I can't PDF the files.
The existing code I use is a simple print and repeat:
How (and where) would I put a find & replace the "/" within "R" variable, so that instead of printing I can pass this as a file name? e.g. 8A/CP becomes 8A-CP or 13W/Ma becomes 13W-Ma.
My existing code works well for printing, but because of the "/" (which we can't change) I can't PDF the files.
The existing code I use is a simple print and repeat:
Code:
Sub PrintfromDropDown() Dim R As Range
For Each R In Sheets("SIMS Classes").Range("g4:g250")
If Not IsEmpty(R) Then
Range("B1") = R
ActiveSheet.PrintOut
End If
Next
End Sub
How (and where) would I put a find & replace the "/" within "R" variable, so that instead of printing I can pass this as a file name? e.g. 8A/CP becomes 8A-CP or 13W/Ma becomes 13W-Ma.