Resources
  • Home
  • December-Chrono
  • Psalm136Personalized
  • ExcelResources
    • 99PublicFunctions
    • aDelimitedCodeTemplate
    • aCodeTemplate
    • aBetter_Code_Template
    • ApplyFormulaValue
    • ArrayPublic
    • ArrayMatchCopyRow
    • Capitalization
    • Colors
    • DataTypes
    • DeleteRows
    • Filter
    • FormatStandard
    • Forms
    • Grid
    • Headers
    • ImageScrape
    • InputBox
  • ExcelResources2
    • Like
    • List Review
    • MatchAndReturn
    • mod_Import
    • Numbers
    • PDF_Parse
    • RandomGenerator
    • iRe1
    • Rept
    • RelatedItemsLIst
    • RomanNumerals
    • SheetSplitter
    • Sort
    • Split Method
    • String_DataType
    • TabDelimited
    • Tab_InsertNew_or_ClearExisting
    • Unique_List
      • UniqueLIsts_FilterMethod
  • Excelresources_Files
    • FileLists
    • FileTextParse
    • Folders
  • excelresources_WebScrape
    • CreateList_1-Href_2-Jpg
    • TableData_Load_PlugPlay
    • CreateList_MultiPage_Image_Link
      • ImageDownload_WebLink_List
    • TableData_Load_ClassDiv
    • TableData_Load_ClassSpan
  • Houseboat Vacation
  • At the Foot of the King
  • Devotions
  • Mentoring
  • Inspirational Stories
    • Vacuum Lifting
  • Job Help
  • Resources
    • MS
    • Florida History
  • Contact
  • Heroscape
    • Fish
    • Playstation
  • You Tube Videos
  • House
    • Tiny Houses
    • Backyards
  • CampingResources
    • CampingLand
    • LED Throwies
  • Interesting
  • Recipes
  • Xbox
  • Skydiving
  • ReadingPlan-5Year
  • Desoto
  • BibleStudy
  • HurricaneIrma
  • Home
  • December-Chrono
  • Psalm136Personalized
  • ExcelResources
    • 99PublicFunctions
    • aDelimitedCodeTemplate
    • aCodeTemplate
    • aBetter_Code_Template
    • ApplyFormulaValue
    • ArrayPublic
    • ArrayMatchCopyRow
    • Capitalization
    • Colors
    • DataTypes
    • DeleteRows
    • Filter
    • FormatStandard
    • Forms
    • Grid
    • Headers
    • ImageScrape
    • InputBox
  • ExcelResources2
    • Like
    • List Review
    • MatchAndReturn
    • mod_Import
    • Numbers
    • PDF_Parse
    • RandomGenerator
    • iRe1
    • Rept
    • RelatedItemsLIst
    • RomanNumerals
    • SheetSplitter
    • Sort
    • Split Method
    • String_DataType
    • TabDelimited
    • Tab_InsertNew_or_ClearExisting
    • Unique_List
      • UniqueLIsts_FilterMethod
  • Excelresources_Files
    • FileLists
    • FileTextParse
    • Folders
  • excelresources_WebScrape
    • CreateList_1-Href_2-Jpg
    • TableData_Load_PlugPlay
    • CreateList_MultiPage_Image_Link
      • ImageDownload_WebLink_List
    • TableData_Load_ClassDiv
    • TableData_Load_ClassSpan
  • Houseboat Vacation
  • At the Foot of the King
  • Devotions
  • Mentoring
  • Inspirational Stories
    • Vacuum Lifting
  • Job Help
  • Resources
    • MS
    • Florida History
  • Contact
  • Heroscape
    • Fish
    • Playstation
  • You Tube Videos
  • House
    • Tiny Houses
    • Backyards
  • CampingResources
    • CampingLand
    • LED Throwies
  • Interesting
  • Recipes
  • Xbox
  • Skydiving
  • ReadingPlan-5Year
  • Desoto
  • BibleStudy
  • HurricaneIrma
Connect on Facebook

VBA Import of:
Modules
Forms

In Order for this to work, you will need to change the Trust Center Settings:

Picture

Import a list of modules (Use VBA instead of Manually doing it)

In the example, Modules/Forms are located in 2 different folders - used 2 strings for Path / File Names


Sub a_99_IMPORT_Modules_Forms_UniversalTranslator()
Dim aSplitMe As Variant
Dim wbTarget As Workbook
Dim sModListDynamic As String, sModListBasic As String

'Set the path for the 2 sets of Modules:
Const sFilePathDynamic As String = "E:\Backup\UniversalTranslator\Excel-VBA Tools\Dynamic_Supplier-KravetTool-Replacement\"
Const sFilePathBasic As String = "E:\Backup\UniversalTranslator\Excel-VBA Tools\"

'Set the strings that contain the list of modules/forms to be imported
sModListDynamic = "mod_Stage1_MatchKey_SF.bas^mod_Stage1_MatchKey_USMD.bas^mod_Stage2_MatchKey.bas^mod_Stage3_PrepInstructionSheet.bas^mod_Stage3_PrepReviewSheet.bas^mod_Stage4_PrepStoreMgr.bas^mod_Stage5_Discontinued_Part2.bas^mod00_HeaderMap_H.bas^mod99_ImageCode.bas^mod99_PricingFormulas.bas^modSplitTabsUsingFilterMarker.bas^form_CreatePricing.frm^frmProcessImages.frm"
sModListBasic = "mod99_PublicFunctions.bas^modCaps.bas^modMatchDISC.bas^modStandardizeWidth.bas^Z_modAttributeStrings.bas^Z_modAttributeTemplateAAA.bas"

'Set the workbook that the modules/forms will be imported into:
Set wbTarget = ActiveWorkbook

'SSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSS
    'Split String (Import the Dynamic Modules/Forms)

    aSplitMe = Split(sModListDynamic, "^")

       'Load All non blank values into the Array (Header Position)
    For iLoop = LBound(aSplitMe) To UBound(aSplitMe)
        wbTarget.VBProject.VBComponents.Import sFilePathDynamic & aSplitMe(iLoop)
    Next iLoop
'SSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSS
'SSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSS
    'Split String  (Import the Basic Modules/Forms)

    aSplitMe = Split(sModListBasic, "^")

       'Load All non blank values into the Array (Header Position)
    For iLoop = LBound(aSplitMe) To UBound(aSplitMe)
        wbTarget.VBProject.VBComponents.Import sFilePathBasic & aSplitMe(iLoop)
    Next iLoop
'SSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSS
Erase aSplitMe

End Sub



Zipping tool that can be used to concatenate the strings:

Sub a_99a_ZipList_Modules_Forms()
Dim iLoop As Long, sTemp As String
Dim iEnd As Long
Dim iCol As Long

iEnd = 13
iCol = 2
For iLoop = 1 To iEnd
    sTemp = sTemp & "^" & Cells(iLoop, iCol)
Next iLoop
Debug.Print sTemp
End Sub



During Testing, it can be tedious to remove modules - this makes it easier

Sub a_99b_REMOVE_Modules_Forms_UniversalTranslator()
'This allows a reset to remove modules/forms created during testing phase:

Dim wbTarget As Workbook

'Set the strings that contain the list of modules/forms to be imported
sModListDynamic = "mod_Stage1_MatchKey_SF^mod_Stage1_MatchKey_USMD^mod_Stage2_MatchKey^mod_Stage3_PrepInstructionSheet^mod_Stage3_PrepReviewSheet^mod_Stage4_PrepStoreMgr^mod_Stage5_Discontinued_Part2^mod00_HeaderMap_H^mod99_ImageCode^mod99_PricingFormulas^modSplitTabsUsingFilterMarker^form_CreatePricing^frmProcessImages"
sModListBasic = "mod99_PublicFunctions^modCaps^modMatchDISC^modStandardizeWidth^Z_modAttributeStrings^Z_modAttributeTemplateAAA"

'Set the workbook that the modules/forms will be imported into:

Set wbTarget = ActiveWorkbook
           
'SSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSS
    'Split String (Import the Dynamic Modules/Forms)

    aSplitMe = Split(sModListDynamic, "^")

       'Load All non blank values into the Array (Header Position)

    For iLoop = LBound(aSplitMe) To UBound(aSplitMe)
        wbTarget.VBProject.VBComponents.Remove wbTarget.VBProject.VBComponents(aSplitMe(iLoop))
    Next iLoop
'SSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSS
'SSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSS
    'Split String  (Import the Basic Modules/Forms)

    aSplitMe = Split(sModListBasic, "^")

       'Load All non blank values into the Array (Header Position)
    For iLoop = LBound(aSplitMe) To UBound(aSplitMe)
        wbTarget.VBProject.VBComponents.Remove wbTarget.VBProject.VBComponents(aSplitMe(iLoop))
    Next iLoop
'SSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSS

End Sub
Powered by Create your own unique website with customizable templates.
  • Home
  • December-Chrono
  • Psalm136Personalized
  • ExcelResources
    • 99PublicFunctions
    • aDelimitedCodeTemplate
    • aCodeTemplate
    • aBetter_Code_Template
    • ApplyFormulaValue
    • ArrayPublic
    • ArrayMatchCopyRow
    • Capitalization
    • Colors
    • DataTypes
    • DeleteRows
    • Filter
    • FormatStandard
    • Forms
    • Grid
    • Headers
    • ImageScrape
    • InputBox
  • ExcelResources2
    • Like
    • List Review
    • MatchAndReturn
    • mod_Import
    • Numbers
    • PDF_Parse
    • RandomGenerator
    • iRe1
    • Rept
    • RelatedItemsLIst
    • RomanNumerals
    • SheetSplitter
    • Sort
    • Split Method
    • String_DataType
    • TabDelimited
    • Tab_InsertNew_or_ClearExisting
    • Unique_List
      • UniqueLIsts_FilterMethod
  • Excelresources_Files
    • FileLists
    • FileTextParse
    • Folders
  • excelresources_WebScrape
    • CreateList_1-Href_2-Jpg
    • TableData_Load_PlugPlay
    • CreateList_MultiPage_Image_Link
      • ImageDownload_WebLink_List
    • TableData_Load_ClassDiv
    • TableData_Load_ClassSpan
  • Houseboat Vacation
  • At the Foot of the King
  • Devotions
  • Mentoring
  • Inspirational Stories
    • Vacuum Lifting
  • Job Help
  • Resources
    • MS
    • Florida History
  • Contact
  • Heroscape
    • Fish
    • Playstation
  • You Tube Videos
  • House
    • Tiny Houses
    • Backyards
  • CampingResources
    • CampingLand
    • LED Throwies
  • Interesting
  • Recipes
  • Xbox
  • Skydiving
  • ReadingPlan-5Year
  • Desoto
  • BibleStudy
  • HurricaneIrma