Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 4
Default Show Dialog of File/Directory

In a userform I would like to allow users to select what picture to display
in an image control, and plan to use LoadPicture() to do it. Question: What
is the dialog that I can use to get file directory information, as follows:

mypict = Application.Dialogs(xlDialogXXXXXXXX).Show
Image1.picture = LoadPicture(mypict)

What is the xlDialog?

Thank you!


  #2   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 27,285
Default Show Dialog of File/Directory

you can't use Application.Dialogs to get the filename - it would just open
the file

use Application.GetOpenfileName()

Dim mypict as String
mypict = application.GetOpenfileName()
if mypict < "False" then
image1.picutre = loadPicture(mypict)
End if

--
Regards,
Tom Ogilvy


B Tuohy wrote in message
...
In a userform I would like to allow users to select what picture to

display
in an image control, and plan to use LoadPicture() to do it. Question:

What
is the dialog that I can use to get file directory information, as

follows:

mypict = Application.Dialogs(xlDialogXXXXXXXX).Show
Image1.picture = LoadPicture(mypict)

What is the xlDialog?

Thank you!




  #3   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 4
Default Show Dialog of File/Directory

How does one refresh the userform? The image doesn't appear in the image
control unless I deactivate or hide the application window and/or userform
itself. Any clues?
Thanks for help, T.O.!

BT

"Tom Ogilvy" wrote in message
...
you can't use Application.Dialogs to get the filename - it would just open
the file

use Application.GetOpenfileName()

Dim mypict as String
mypict = application.GetOpenfileName()
if mypict < "False" then
image1.picutre = loadPicture(mypict)
End if

--
Regards,
Tom Ogilvy


B Tuohy wrote in message
...
In a userform I would like to allow users to select what picture to

display
in an image control, and plan to use LoadPicture() to do it. Question:

What
is the dialog that I can use to get file directory information, as

follows:

mypict = Application.Dialogs(xlDialogXXXXXXXX).Show
Image1.picture = LoadPicture(mypict)

What is the xlDialog?

Thank you!






  #4   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 1,236
Default Show Dialog of File/Directory

BT,

Dim mypict As String
mypict = Application.GetOpenFilename()
If mypict < "False" Then
Image1.Picture = LoadPicture(mypict)
End If
Me.Repaint

Rob

"B Tuohy" wrote in message
...
How does one refresh the userform? The image doesn't appear in the image
control unless I deactivate or hide the application window and/or userform
itself. Any clues?
Thanks for help, T.O.!

BT

"Tom Ogilvy" wrote in message
...
you can't use Application.Dialogs to get the filename - it would just

open
the file

use Application.GetOpenfileName()

Dim mypict as String
mypict = application.GetOpenfileName()
if mypict < "False" then
image1.picutre = loadPicture(mypict)
End if

--
Regards,
Tom Ogilvy


B Tuohy wrote in message
...
In a userform I would like to allow users to select what picture to

display
in an image control, and plan to use LoadPicture() to do it. Question:

What
is the dialog that I can use to get file directory information, as

follows:

mypict = Application.Dialogs(xlDialogXXXXXXXX).Show
Image1.picture = LoadPicture(mypict)

What is the xlDialog?

Thank you!








  #5   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 4
Default Show Dialog of File/Directory

Beautiful. Thanks!
(These newsgroups are terrific!)

"Rob van Gelder" wrote in message
...
BT,

Dim mypict As String
mypict = Application.GetOpenFilename()
If mypict < "False" Then
Image1.Picture = LoadPicture(mypict)
End If
Me.Repaint

Rob

"B Tuohy" wrote in message
...
How does one refresh the userform? The image doesn't appear in the

image
control unless I deactivate or hide the application window and/or

userform
itself. Any clues?
Thanks for help, T.O.!

BT

"Tom Ogilvy" wrote in message
...
you can't use Application.Dialogs to get the filename - it would just

open
the file

use Application.GetOpenfileName()

Dim mypict as String
mypict = application.GetOpenfileName()
if mypict < "False" then
image1.picutre = loadPicture(mypict)
End if

--
Regards,
Tom Ogilvy


B Tuohy wrote in message
...
In a userform I would like to allow users to select what picture to
display
in an image control, and plan to use LoadPicture() to do it.

Question:
What
is the dialog that I can use to get file directory information, as
follows:

mypict = Application.Dialogs(xlDialogXXXXXXXX).Show
Image1.picture = LoadPicture(mypict)

What is the xlDialog?

Thank you!












  #6   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 1
Default Show Dialog of File/Directory

Where can I find a list of all Application.Dialogs(xlDialog****).Sho
commands?
I know the Send Mail as Attachment command "File-Send To-Mai
Recipient (as Attachment)" i
Application.Dialogs(xlDialogSendMail).Show
but the command I want is the one right above that in the menu
"File-Send To-Mail Recipient"
Please hel

--
Message posted from http://www.ExcelForum.com

  #7   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 2,824
Default Show Dialog of File/Directory

in VBA's help.

You can search for: BuiltIn;dialog;argument;list;

(or you could drill your way through the help for dialogs.)



"kalel_rojin <" wrote:

Where can I find a list of all Application.Dialogs(xlDialog****).Show
commands?
I know the Send Mail as Attachment command "File-Send To-Mail
Recipient (as Attachment)" is
Application.Dialogs(xlDialogSendMail).Show
but the command I want is the one right above that in the menu.
"File-Send To-Mail Recipient"
Please help

---
Message posted from http://www.ExcelForum.com/


--

Dave Peterson

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
Show the Outline Dialog Box TKS_Mark Excel Discussion (Misc queries) 0 May 14th 08 08:07 PM
file save error: the file or directory cannot be created dublg Excel Discussion (Misc queries) 1 September 25th 06 07:07 PM
Excel should let me sort the file directory when saving a file Beanee70 Excel Discussion (Misc queries) 0 March 14th 06 07:03 AM
get path - save new file - same sub-directory as existing file tegger Excel Programming 2 October 21st 03 10:45 AM
Show Dialog Box - Edit/Replace MaxLamer Excel Programming 3 October 2nd 03 08:58 PM


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