Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.programming
pat pat is offline
external usenet poster
 
Posts: 4
Default Common Dialog Box

I'm trying to program a macro using VBA in Excel 97 SR-1.

I've included a common dialog box control that opens the directory tree so
the user can pick a file.
This works fine on my machine but when I send the spreadsheet to others
users they get an error saying that the dialog box can't be created.

When I try to include a dialog box to the spreadsheet from their computer, I
get a "Cannot insert object" error. When I try to put a cdb on a UserForm in
the spreadsheet on a user machine, I get a License error.

I've tried registering the .dll and .ocx involved using regsvr32. I'm not
sure if a guid is wrong or a license key in the registry is wrong or what.
I'm not really sure where to look in the registry for the license key.

What I don't understand is why I can't include this control from their
computer? The common dialog control is checked under the 'References'
section. I should be able to re-create the macro from a user machine without
running into the licensing issue, right?

Anyone have any thoughts on how I could get around this problem?


  #2   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 27,285
Default Common Dialog Box

it is easier to use

fname = Application.GetOpenfileName( ... see arg list in help )

Which puts up the standard file open dialog and returns a string (or array
of strings if multiselect = true) of the file(s) selected by the user. It
does not open the files. You use the string (array) to then open the files.

There is also an Application.GetSaveAsFilename

Regards,
Tom Ogilvy



"pat" wrote in message
...
I'm trying to program a macro using VBA in Excel 97 SR-1.

I've included a common dialog box control that opens the directory tree so
the user can pick a file.
This works fine on my machine but when I send the spreadsheet to others
users they get an error saying that the dialog box can't be created.

When I try to include a dialog box to the spreadsheet from their computer,

I
get a "Cannot insert object" error. When I try to put a cdb on a UserForm

in
the spreadsheet on a user machine, I get a License error.

I've tried registering the .dll and .ocx involved using regsvr32. I'm not
sure if a guid is wrong or a license key in the registry is wrong or what.
I'm not really sure where to look in the registry for the license key.

What I don't understand is why I can't include this control from their
computer? The common dialog control is checked under the 'References'
section. I should be able to re-create the macro from a user machine

without
running into the licensing issue, right?

Anyone have any thoughts on how I could get around this problem?




  #3   Report Post  
Posted to microsoft.public.excel.programming
pat pat is offline
external usenet poster
 
Posts: 4
Default Common Dialog Box

Excellent! Thanks a lot, Tom.


"Tom Ogilvy" wrote in message
...
it is easier to use

fname = Application.GetOpenfileName( ... see arg list in help )

Which puts up the standard file open dialog and returns a string (or array
of strings if multiselect = true) of the file(s) selected by the user. It
does not open the files. You use the string (array) to then open the

files.

There is also an Application.GetSaveAsFilename

Regards,
Tom Ogilvy



"pat" wrote in message
...
I'm trying to program a macro using VBA in Excel 97 SR-1.

I've included a common dialog box control that opens the directory tree

so
the user can pick a file.
This works fine on my machine but when I send the spreadsheet to others
users they get an error saying that the dialog box can't be created.

When I try to include a dialog box to the spreadsheet from their

computer,
I
get a "Cannot insert object" error. When I try to put a cdb on a

UserForm
in
the spreadsheet on a user machine, I get a License error.

I've tried registering the .dll and .ocx involved using regsvr32. I'm

not
sure if a guid is wrong or a license key in the registry is wrong or

what.
I'm not really sure where to look in the registry for the license key.

What I don't understand is why I can't include this control from their
computer? The common dialog control is checked under the 'References'
section. I should be able to re-create the macro from a user machine

without
running into the licensing issue, right?

Anyone have any thoughts on how I could get around this problem?






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
Second Most Common Value Skalp Excel Discussion (Misc queries) 6 May 9th 23 07:43 PM
Combining two ranges based on common a common value ahmed[_3_] Excel Discussion (Misc queries) 5 April 18th 09 05:04 PM
Common footer but not common margins please -(Page 1 of 2) etc RajenRajput1 Excel Discussion (Misc queries) 9 August 26th 08 06:56 PM
Common Dialog from Toolbox JRXPL New Users to Excel 0 April 23rd 08 04:36 AM
How to delete the "Insert Function Dialog Box" (dialog box only)? TBI''d biker Excel Worksheet Functions 2 April 7th 07 09:18 PM


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

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

About Us

"It's about Microsoft Excel"