Tonysdilemma
New Member
- Joined
- Aug 2, 2020
- Messages
- 30
- Office Version
- 2016
- Platform
- Windows
I have designed a parcel collection system within Excel.
I have 80 modules written up.
One off the modules is coded as follows
I want to use the 80 modules on another computer. Everything will remain the same except for the file where it is saved when a parcel is collected. At the moment the current file to which it is saved is "C:\Users\JustOne\Desktop\Rabbits\Parcels Collected\"
Is there a way where the file name in the modules can be changed without writing it up 80 times?
I have 80 modules written up.
One off the modules is coded as follows
VBA Code:
Sub SaveSheetToPDF1()
Dim ws As Worksheet
Set ws = ActiveSheet
Sheet7.Unprotect Password:="pixieland"
ws.Unprotect Password:="pixieland"
ws.Range("A1:I12").ExportAsFixedFormat xlTypePDF, Filename:= _
"C:\Users\JustOne\Desktop\Rabbits\Parcels Collected\", Openafterpublish:=False
Sheet7.Range("B3:D3").ClearContents
Sheet7.Range("F3:H3").ClearContents
ws.Range("C6:E6").ClearContents
ws.Range("G7:H12").Delete
ws.Range("C9:E12").ClearContents
ws.Protect Password:="pixieland", UserInterfaceOnly:=True
Sheet7.Protect Password:="pixieland", UserInterfaceOnly:=True
Sheet7.Range("A3").Value = Sheet7.Range("A3").Value Mod 99 + 1.01
Sheet7.Protect Password:="pixieland", DrawingObjects:=False, Contents:=True, Scenarios:=True
Sheet7.Activate
End Sub
I want to use the 80 modules on another computer. Everything will remain the same except for the file where it is saved when a parcel is collected. At the moment the current file to which it is saved is "C:\Users\JustOne\Desktop\Rabbits\Parcels Collected\"
Is there a way where the file name in the modules can be changed without writing it up 80 times?
Last edited by a moderator: