Hello,
Below is code that works nicely (I didn’t include the whole macro):Const stPath As String = “K:GroupsADP2012Schedules”
Dim stFileName As String
Dim FileName As String
FileName = ActiveSheet.Name
stAttachment = stPath & “” & FileName & “.pdf”
When I change the “Const stPath As String” line to:
Const stPath As String = “K:GroupsADP” [/COLOR]& Sheet4.Range(“G2”) & ”Schedules”
[/COLOR]I keep getting an error message that says “constant expression required”… which makes sense now that I think about it because I’m trying to change it when the cell value changes, which means it’s not “constant”, but rather a “variable”, however I clearly don’t know how to change the code to do that.
Any help on how I could change the code to not be a constant so it can change the path whenever the value in Sheet4.Range(“G2”) changes would be greatly appreciated.
Thanks!
Lana