Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 196
Default Import file dialog

I am using excel 97.

I want to try and ease the way a module/form/class module
is imported into a project by way of another macro.

I am using the code:-

ActiveWorkbook.VBProject.VBComponents.Import
FileName:="Mymodule"

But I want to take things step further, if it's possible
by importing a module and being able to choose it from a
Import file dialog.

Ideally from Excel itself and not the VBA editor window.

Is it possible, and if so can someone assist, please?

Mark



  #2   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 5,441
Default Import file dialog

Mark,

Use code to ask for the filename:

Dim myFile As String
myFile = Application.GetOpenFilename
ActiveWorkbook.VBProject.VBComponents.Import _
Filename:=myFile

HTH,
Bernie
MS Excel MVP

"Mark" wrote in message
...
I am using excel 97.

I want to try and ease the way a module/form/class module
is imported into a project by way of another macro.

I am using the code:-

ActiveWorkbook.VBProject.VBComponents.Import
FileName:="Mymodule"

But I want to take things step further, if it's possible
by importing a module and being able to choose it from a
Import file dialog.

Ideally from Excel itself and not the VBA editor window.

Is it possible, and if so can someone assist, please?

Mark





Reply
Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Posting Rules

Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On


Similar Threads
Thread Thread Starter Forum Replies Last Post
Skipping Import Text File dialog in a Macro Leon Excel Discussion (Misc queries) 5 January 21st 08 09:12 PM
How can I have the Import External Data dialog pop up on open? Benny Setting up and Configuration of Excel 1 November 19th 05 10:13 AM
open file dialog-select file-import worksheet Divinedar Excel Programming 1 January 16th 04 07:13 PM
Prompt user to select file with default file selected dialog Bruce Cooley Excel Programming 0 September 15th 03 06:43 AM
Prompt user to select file with default file selected dialog Bob Phillips[_5_] Excel Programming 0 September 14th 03 09:22 PM


All times are GMT +1. The time now is 01:33 PM.

Powered by vBulletin® Copyright ©2000 - 2025, Jelsoft Enterprises Ltd.
Copyright ©2004-2025 ExcelBanter.
The comments are property of their posters.
 

About Us

"It's about Microsoft Excel"