Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 6
Default CommonDialog control issue

I'm having trouble deploying a macro which uses the CommonDialog control.

Initially I was having trouble deploying the macro as the CommonDialog
control would only work (when placed on the worksheet) if VB was installed on
the machine.

I then read somewhere (http://www.kbalertz.com/kb_281848.aspx) that the
control could be included in a UserForm as it would then count as a run time
control rather than design time one.

This works fine on 97 but when run on a machine with 2000 (but no VB), we
get the following issue:

&H80004005 (-2147467259)

I'm thinking this may be an occurrence of this:

http://support.microsoft.com/default...b;en-us;230888

Is there another method to contain the CommonDialog control rather than
using UserForms?
  #2   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 27,285
Default CommonDialog control issue

to the best of my knowledge, it always counts as a being in design mode when
run in an office app and you need a design time license. You will need to
use the commondialog API.

If you are just doing a fileopen or filesaveas, then use
Application.GetOpenFileName
or
Application.GetSaveAsFileName

--
Regards,
Tom Ogilvy


"Rob Docherty" wrote in message
...
I'm having trouble deploying a macro which uses the CommonDialog control.

Initially I was having trouble deploying the macro as the CommonDialog
control would only work (when placed on the worksheet) if VB was installed

on
the machine.

I then read somewhere (http://www.kbalertz.com/kb_281848.aspx) that the
control could be included in a UserForm as it would then count as a run

time
control rather than design time one.

This works fine on 97 but when run on a machine with 2000 (but no VB), we
get the following issue:

&H80004005 (-2147467259)

I'm thinking this may be an occurrence of this:

http://support.microsoft.com/default...b;en-us;230888

Is there another method to contain the CommonDialog control rather than
using UserForms?



  #3   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 6
Default CommonDialog control issue

Thanks Tom, Application.GetOpenFileName does what I need just fine.

Rob

"Tom Ogilvy" wrote:

to the best of my knowledge, it always counts as a being in design mode when
run in an office app and you need a design time license. You will need to
use the commondialog API.

If you are just doing a fileopen or filesaveas, then use
Application.GetOpenFileName
or
Application.GetSaveAsFileName

--
Regards,
Tom Ogilvy


"Rob Docherty" wrote in message
...
I'm having trouble deploying a macro which uses the CommonDialog control.

Initially I was having trouble deploying the macro as the CommonDialog
control would only work (when placed on the worksheet) if VB was installed

on
the machine.

I then read somewhere (http://www.kbalertz.com/kb_281848.aspx) that the
control could be included in a UserForm as it would then count as a run

time
control rather than design time one.

This works fine on 97 but when run on a machine with 2000 (but no VB), we
get the following issue:

&H80004005 (-2147467259)

I'm thinking this may be an occurrence of this:

http://support.microsoft.com/default...b;en-us;230888

Is there another method to contain the CommonDialog control rather than
using UserForms?




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
Control key Issue Excel 03 Peterabb Excel Discussion (Misc queries) 3 March 7th 07 07:56 PM
Using commondialog.showopen Didier Poskin Excel Programming 4 June 5th 05 10:07 PM
Calendar Control - Display Issue AG[_5_] Excel Programming 0 November 10th 04 08:42 PM
CommonDialog Error Syed Zeeshan Haider[_3_] Excel Programming 3 November 19th 03 07:50 PM
CommonDialog Error Clement Excel Programming 2 November 19th 03 11:19 AM


All times are GMT +1. The time now is 11:30 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"