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
-
Uninstalr Updates
by
jv16
3 hours, 5 minutes ago -
Apple zero days for April
by
Susan Bradley
11 minutes ago -
CVE program gets last-minute funding from CISA – and maybe a new home
by
Nibbled To Death By Ducks
3 hours, 53 minutes ago -
Whistleblower describes DOGE IT dept rumpus at America’s labor watchdog
by
Nibbled To Death By Ducks
15 hours, 43 minutes ago -
Seeing BSOD’s on 24H2?
by
Susan Bradley
28 minutes ago -
TUT For Private Llama LLM, Local Installation and Isolated from the Internet.
by
bbearren
6 hours, 6 minutes ago -
Upgrade from Windows 10 to 11
by
Holdsworth8
1 day ago -
Microsoft : AI-powered deception: Emerging fraud threats and countermeasures
by
Alex5723
1 day, 3 hours ago -
0patch
by
WSjcgc50
4 hours, 11 minutes ago -
Devices might encounter blue screen exception with the recent Windows updates
by
Susan Bradley
20 hours, 34 minutes ago -
Windows 11 Insider Preview Build 22631.5261 (23H2) released to Release Preview
by
joep517
1 day, 6 hours ago -
Problem opening image attachments
by
RobertG
1 day, 7 hours ago -
advice for setting up a new windows computer
by
routtco1001
1 day, 22 hours ago -
It’s Identity Theft Day!
by
Susan Bradley
1 day, 2 hours ago -
Android 15 require minimum 32GB of storage
by
Alex5723
2 days, 3 hours ago -
Mac Mini 2018, iPhone 6s 2015 Are Now Vintage
by
Alex5723
2 days, 3 hours ago -
Hertz says hackers stole customer credit card and driver’s license data
by
Alex5723
2 days, 4 hours ago -
Firefox became sluggish
by
Rick Corbett
2 days ago -
Windows 10 Build 19045.5794 (22H2) to Release Preview Channel
by
joep517
2 days, 7 hours ago -
Windows 11 Insider Preview Build 22635.5235 (23H2) released to BETA
by
joep517
2 days, 8 hours ago -
A Funny Thing Happened on the Way to the Forum
by
bbearren
1 day, 5 hours ago -
Download speeds only 0.3Mbps after 24H2 upgrade on WiFi and Ethernet
by
John
2 hours, 38 minutes ago -
T-Mobile 5G Wireless Internet
by
WSmmi16
1 day, 6 hours ago -
Clock missing above calendar in Windows 10
by
WSCape Sand
1 day, 7 hours ago -
Formula to Calculate Q1, Q2, Q3, or Q4 of the Year?
by
WSJon5
2 days, 23 hours ago -
The time has come for AI-generated art
by
Catherine Barrett
2 days, 3 hours ago -
Hackers are using two-factor authentication to infect you
by
B. Livingston
2 days, 12 hours ago -
23 and you
by
Max Stul Oppenheimer
2 days, 20 hours ago -
April’s deluge of patches
by
Susan Bradley
1 day ago -
Windows 11 Windows Updater question
by
Tex265
14 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.