Home
FREE DOWNLOADS
VBA Tutorials
VBA Code Samples
VBA for Beginners
Save Time on PC
SaveTimeWebsite
Save Time News
Save Time Blog
SaveTime SiteMap
Customer Service
Gibberish
Improve Quality

Subscribe To
This Site

XML RSS
Add to Google
Add to My Yahoo!
Add to My MSN
Add to Newsgator
Subscribe with Bloglines



Export VBA Excel

You can export the VBA in Excel, Word, etc. by adding a reference to the

"Microsoft Visual Basic for Applications Extensibility 5.3" and using the

following code...

You can export vba excel, Word, etc. by adding a reference to the "Microsoft

Visual Basic for Applications Extensibility 5.3" and using the following code...


You can export vba excel, Word, etc. by adding a reference to the "Microsoft

Visual Basic for Applications Extensibility 5.3" and using the following code...

(How to add a reference )

Sub Export_VBA_Excel()
    Dim Mod_UsrFrm As VBIDE.VBComponent
    Dim strExt As String
    For Each Mod_UsrFrm In ActiveWorkbook.VBProject.VBComponents
        If Mod_UsrFrm.Type = vbext_ct_StdModule Then
           strExt = ".bas"
        ElseIf Mod_UsrFrm.Type = vbext_ct_ClassModule Then
           strExt = ".cls"
        ElseIf Mod_UsrFrm.Type = vbext_ct_Document Then
           strExt = ".cls"
        ElseIf Mod_UsrFrm.Type = vbext_ct_MSForm Then
           strExt = ".frm"
        Else
           strExt = ""
        End If
        If strExt <> "" Then
           Mod_UsrFrm.Export ActiveWorkbook.Path & "\" & Mod_UsrFrm.Name & strExt
        End If
    Next
End Sub


Google


Return from Export VBA Excel to VBA Code Samples


Return to our Homepage


footer for Save Time page