PDA

View Full Version : [SOLVED] Specify Export Path



johnske
02-12-2005, 03:26 AM
I thought I had this right, but I was wrong.

I want to export a module, but I want to specify exactly where I wanted exported to i.e. Desktop or My Documents or wherever...How?

The export procedure is


Sub ExportModule()
Application.VBE.ActiveVBProject.VBComponents(1).Export ("Version101.bas")
End Sub
(Dunno why it's showing in preview as Ex port)

TIA
John

Jacob Hilderbrand
02-12-2005, 03:31 AM
I'll let Mark know about the word Export being splitted for some reason.

You just need to specify the path with the file name.


Option Explicit

Sub ExportModule()
Application.VBE.ActiveVBProject.VBComponents(1).Export _
("c:\Version101.bas")
End Sub

johnske
02-12-2005, 03:52 AM
Thanx Jake,

Works a treat. :thumb

(I specified the path differently for import and it worked so I assumed it'd work for export as well, but it don't)

Jacob Hilderbrand
02-12-2005, 04:01 AM
You're Welcome :beerchug:

Take Care