Skip to content

Conversation

DecimalTurn
Copy link

  • 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
Copy link
Author

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

Copy link
Author

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"
Copy link
Author

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

Copy link
Author

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

Copy link
Author

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\
Copy link
Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Path changed

@DecimalTurn
Copy link
Author

@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.
I'm looking forward for your feedback.

@brochuJP brochuJP merged commit 4b34e72 into brochuJP:patch-1 Dec 2, 2017
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants