-
Notifications
You must be signed in to change notification settings - Fork 1
Change to Installer.bas #2
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Conversation
DecimalTurn
commented
Nov 19, 2017
- Typos removed in the description
- Adjustment of the file path to take into account the new location of Installer.bas
- Replaced the loop on the lines of the module by an import command to make things simpler.
- Option Explicit and string variables declaration added
- Typos removed in the description - Adjustment of the file path to take into account the new location of Installer.bas - Replaced the loop on the lines of the module by an import command to make things simpler.
@@ -0,0 +1,52 @@ | |||
Attribute VB_Name = "Installer" | |||
Option Explicit |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Option Explicit: Just to keep good practices.
'Import code form Build.bas to the new workbook | ||
strPathOfBuild = CurrentWB.Path & "\src\vbaDeveloper.xlam\Build.bas" | ||
NewWB.VBProject.VBComponents.Import strPathOfBuild | ||
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Using the import command instead of importing line by line which can cause issues for users which have Option Explicit appear at the top of every module they make. That Option Explicit would then be in conflict with the one already in the build.bas module.
Set NewWB = Workbooks.Add | ||
|
||
'Import code form Build.bas to the new workbook | ||
strPathOfBuild = CurrentWB.Path & "\src\vbaDeveloper.xlam\Build.bas" |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Need to change the path to take into account the new location of Installer.bas
'In VB Editor, menu File-->Save Book1; Save as vbaDeveloper.xlam in the same directory as 'src' | ||
strLocationXLAM = CurrentWB.Path | ||
NewWB.SaveAs strLocationXLAM & "\vbaDeveloper.xlam", xlOpenXMLAddIn | ||
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Again, need to change the path
|
||
'2) Open the VB Editor (Alt+F11) right click on the active project and choose Import a file and chose: | ||
' *\GIT\vbaDeveloper-master\Installer.bas | ||
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Path changed
Option Explicit | ||
|
||
'1) Create an Excel file called Installer.xlsm in same folder than Installer.bas: | ||
' *\GIT\vbaDeveloper-master\ |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Path changed
@brochuJP For some reason, everything appears in green, but I didn't change everything. To make it easier for you to see where I've made my edits, I added some comments. |