I am trying to create an image on a dialog box that will display a preview of a selected file, similar to the preview panel in the open file dialog box. I think that I need to use an image box to display the image, but how do I get the image of the file? Any help will be appreciated.
![]() |
Patch reliability is unclear. Unless you have an immediate, pressing need to install a specific patch, don't do it. |
SIGN IN | Not a member? | REGISTER | PLUS MEMBERSHIP |
-
Previewing a file with a Userform (XL2000 SR1)
Home » Forums » AskWoody support » Productivity software by function » MS Excel and spreadsheet help » Previewing a file with a Userform (XL2000 SR1)
- This topic has 6 replies, 3 voices, and was last updated 23 years, 8 months ago.
AuthorTopicWSthompma3
AskWoody LoungerAugust 22, 2001 at 4:02 pm #359393Viewing 2 reply threadsAuthorReplies-
H. Legare Coleman
AskWoody Plus -
WSthompma3
AskWoody Lounger -
WSthompma3
AskWoody LoungerAugust 22, 2001 at 5:31 pm #538576Yes, I see what you are saying. But that is not what I am trying to do. I would like to emulate that functionality of the Open File Dialog box. The user will be presented with an interface to navigate to his file and when he selects it, I would like the preview of that particular file to appear on the Userform. The utility that I am building will import an exsisting spreadsheet into my utility, so the file that is selected will always be an .xls file. I just want the user to have a visual of the file that he selected.
Thanks
-
H. Legare Coleman
AskWoody PlusAugust 22, 2001 at 5:58 pm #538583I am assuming that you want a picture of what the file looks like at the moment to appear, not a picture of the file as it was the day you wrote the code. If so, what you are going to have to do is write code (probably in the change event for the control that the user selects the file) to copy a picture of what you want to display and then paste it into the control. Depending on what control you are using, you might have to put the picture into a file that is loaded by the control. This is not going to be simple in VBA since you don’t have things like memory bit maps that you can use for the picture.
-
WSAndrew Cronnolly
AskWoody LoungerAugust 22, 2001 at 9:52 pm #538605You would need additional controls that do not ship with VBA to achieve waht you want. Why not use the built in File Open dialog itself, e.g.
strFilename = Application.GetOpenFilename
will return the full path and name of and name of the file selected. It will not actually open it.
Andrew C
-
-
WSAndrew Cronnolly
AskWoody LoungerAugust 22, 2001 at 5:13 pm #538574If you are trying to get a picture of a file open dialog box with a certain file selected, go through the motions of selecting the file, and when it is highlighted pres Alt-PrintScreen, launch a bitmap editing program such as Paint or Photo Editor and select edit Paste. You should have a copy of the Dialog box which you can crop and edit as required, save it ( as a jpeg, as it will be more compact) and then you can insert into your userform.
Does that help ?
Andrew C
Viewing 2 reply threads -

Plus Membership
Donations from Plus members keep this site going. You can identify the people who support AskWoody by the Plus badge on their avatars.
AskWoody Plus members not only get access to all of the contents of this site -- including Susan Bradley's frequently updated Patch Watch listing -- they also receive weekly AskWoody Plus Newsletters (formerly Windows Secrets Newsletter) and AskWoody Plus Alerts, emails when there are important breaking developments.
Get Plus!
Welcome to our unique respite from the madness.
It's easy to post questions about Windows 11, Windows 10, Win8.1, Win7, Surface, Office, or browse through our Forums. Post anonymously or register for greater privileges. Keep it civil, please: Decorous Lounge rules strictly enforced. Questions? Contact Customer Support.
Search Newsletters
Search Forums
View the Forum
Search for Topics
Recent Topics
-
Unable to eject external hard drives
by
Robertos42
40 minutes ago -
Saying goodbye to not-so-great technology
by
Susan Bradley
2 minutes ago -
Tech I don’t miss, and some I do
by
Will Fastie
16 minutes ago -
Synology limits hard drives
by
Susan Bradley
16 hours, 23 minutes ago -
Links from Microsoft 365 and from WhatsApp not working
by
rog7
22 hours, 27 minutes ago -
WhatsApp Security Advisories CVE-2025-30401
by
Alex5723
22 hours, 28 minutes ago -
Upgrade Sequence
by
doneager
15 hours, 54 minutes ago -
Chrome extensions with 6 million installs have hidden tracking code
by
Nibbled To Death By Ducks
16 hours, 2 minutes ago -
Uninstall “New Outlook” before installing 2024 Home & Business?
by
Tex265
15 hours, 47 minutes ago -
The incredible shrinking desktop icons
by
Thumper
1 day, 19 hours ago -
Windows 11 Insider Preview Build 22635.520 (23H2) released to BETA
by
joep517
1 day, 21 hours ago -
Connecting hard drive on USB 3.2 freezes File Explorer & Disk Management
by
WSJMGatehouse
16 hours, 30 minutes ago -
Shellbag Analyser & Cleaner Update
by
Microfix
6 hours, 14 minutes ago -
CISA warns of increased breach risks following Oracle Cloud leak
by
Nibbled To Death By Ducks
2 days, 6 hours ago -
Outlook 2024 two sent from email addresses
by
Kathy Stevens
1 day, 10 hours ago -
Speeding up 11’s search
by
Susan Bradley
12 hours, 14 minutes ago -
HP Pavilion Will Not Wake Up After Being Idle for Longer Period
by
WSwalterwood44
6 hours, 39 minutes ago -
Make a Windows 11 Local Account Passwordless
by
Drcard:))
2 days, 20 hours ago -
Ubuntu 25.04 (Plucky Puffin)
by
Alex5723
3 days, 3 hours ago -
24H2 fixed??
by
CWBillow
1 day, 20 hours ago -
Uninstalr Updates
by
jv16
3 days, 9 hours ago -
Apple zero days for April
by
Susan Bradley
2 days, 13 hours ago -
CVE program gets last-minute funding from CISA – and maybe a new home
by
Nibbled To Death By Ducks
2 days, 6 hours ago -
Whistleblower describes DOGE IT dept rumpus at America’s labor watchdog
by
Nibbled To Death By Ducks
4 days, 7 hours ago -
Seeing BSOD’s on 24H2?
by
Susan Bradley
3 days, 14 hours ago -
TUT For Private Llama LLM, Local Installation and Isolated from the Internet.
by
bbearren
3 days, 22 hours ago -
Upgrade from Windows 10 to 11
by
Holdsworth8
4 days, 16 hours ago -
Microsoft : AI-powered deception: Emerging fraud threats and countermeasures
by
Alex5723
4 days, 19 hours ago -
0patch
by
WSjcgc50
21 hours ago -
Devices might encounter blue screen exception with the recent Windows updates
by
Susan Bradley
4 days, 12 hours ago
Recent blog posts
Key Links
Want to Advertise in the free newsletter? How about a gift subscription in honor of a birthday? Send an email to sb@askwoody.com to ask how.
Mastodon profile for DefConPatch
Mastodon profile for AskWoody
Home • About • FAQ • Posts & Privacy • Forums • My Account
Register • Free Newsletter • Plus Membership • Gift Certificates • MS-DEFCON Alerts
Copyright ©2004-2025 by AskWoody Tech LLC. All Rights Reserved.