sailor1301
New Member
- Joined
- Feb 5, 2021
- Messages
- 1
- Office Version
- 2010
- Platform
- Windows
Hi everybdy,
this is my first post in this forum, so I kindly asl for a little bit of patience
What I need:
1. From an big table I would like to select a certain range of choice
2. thefilename would be applied from a specific cell
3. the file should be saved either in a specific directory (G:\3100\Team 3100\Jour Fixe\Jour-fixe TEAM 3100\) OR by choice to select a specific folder (Here I would be happy to have two options as some departments would use option 1 and others option 2)
I have used to following code: the original code gives a fixed filename.
When I add an adress I get an syntax error message
I would be very greatful for help thanks i advance
Stefan (from Austria)
Sub pdf_neu1()
Dim saveLocation As String
'saveLocation = "G:\3100\Team 3100\Jour Fixe\Jour-fixe TEAM 3100\myPDFFile.pdf"
saveLocation = "G:\3100\Team 3100\Jour Fixe\Jour-fixe TEAM 3100\& Range("T2").Value & ".pdf""
Selection.ExportAsFixedFormat Type:=xlTypePDF, _
Filename:=saveLocation
End Sub
this is my first post in this forum, so I kindly asl for a little bit of patience
What I need:
1. From an big table I would like to select a certain range of choice
2. thefilename would be applied from a specific cell
3. the file should be saved either in a specific directory (G:\3100\Team 3100\Jour Fixe\Jour-fixe TEAM 3100\) OR by choice to select a specific folder (Here I would be happy to have two options as some departments would use option 1 and others option 2)
I have used to following code: the original code gives a fixed filename.
When I add an adress I get an syntax error message
I would be very greatful for help thanks i advance
Stefan (from Austria)
Sub pdf_neu1()
Dim saveLocation As String
'saveLocation = "G:\3100\Team 3100\Jour Fixe\Jour-fixe TEAM 3100\myPDFFile.pdf"
saveLocation = "G:\3100\Team 3100\Jour Fixe\Jour-fixe TEAM 3100\& Range("T2").Value & ".pdf""
Selection.ExportAsFixedFormat Type:=xlTypePDF, _
Filename:=saveLocation
End Sub