View Single Post
  #4   Report Post  
Posted to microsoft.public.excel.programming
Rob van Gelder[_4_] Rob van Gelder[_4_] is offline
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!