Solved

Embed selected cells into a user form

Posted on 2013-11-14
10
291 Views
Last Modified: 2013-11-15
Folks,
I have attached a workbook with a worksheet that I would like to embed into a form but only the cells with data. Any ideas?
Book1.xlsm
0
Comment
Question by:Frank Freese
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
  • 7
  • 3
10 Comments
 
LVL 12

Expert Comment

by:Harry Lee
ID: 39649996
You have to install Office Web Component 11 to do that. OWC11 was supposed to be used with Office 2003 but it works fine in 32-bit Office 2007. I have not try it with Office 2010 yet.

Once OWC11 is installed, in the VBA Editor, go to Tools -> References. Make sure Microsoft Office Web Components is enabled.

On the user form, right-click on the Controls Toolbox, and select Additional Controls. Scroll down to enable Microsoft Office Spreadsheet.

You should now be able to embed Spreadsheet in user forms.
0
 

Author Comment

by:Frank Freese
ID: 39650070
This might be too much of Excel for my users. It's a great control though.
Here's what I was looking for. A control or some VBA that would allow me to embed into a user form the contents (Range XX:YY) ,without the gridlines, from a worksheet.  This does not mean the Web Control won't do this because I've not worked with it before.
Let's see if others have another option for me.
0
 

Author Comment

by:Frank Freese
ID: 39651467
Folks,
My research showed that Office Web Component 11 has to be installed on each machine to work. If that's the case then I will need a different option(s).
I tried capturing what I wanted from Excel as a jpg file and embedding it into a text control but it really looks "bad".
What I'm asking may not be possible. If that's the case then I could simply hyperlink to another worksheet in the workbook where the information resides.
I thank all for you're consideration and input, as always.
0
[Live Webinar] The Cloud Skills Gap

As Cloud technologies come of age, business leaders grapple with the impact it has on their team's skills and the gap associated with the use of a cloud platform.

Join experts from 451 Research and Concerto Cloud Services on July 27th where we will examine fact and fiction.

 

Author Comment

by:Frank Freese
ID: 39651569
Joop.
The multicolumn listbox is worth investigating, however, the formatting is very important part to make the user better understand. Loosing that would confuse them. You can look at the embeeded file I included in this thread to see what I mean.
If there was just a control that allowed one to copy and paste into the control on the user form without loosing formatting with scroll bars would be great.  
There may not be such a control - I'm looking for one though, or VBA.
0
 
LVL 12

Accepted Solution

by:
Harry Lee earned 500 total points
ID: 39651773
fh_freese,

I have created an image of the info you want to show on a user form, then, I have created a userform with a frame inserted. Then put the picture into the frame. Add scroll bar to the frame.

Can you check if it is good enough for you?
Book1-with-UserForm.xlsm
0
 

Author Comment

by:Frank Freese
ID: 39651817
HarryHYLee,
Stupid me!!!!!! I forgot about the frame.....this will work.
I really appreciate you hanging in there with me!
Thanks - points well earned.
0
 

Author Closing Comment

by:Frank Freese
ID: 39651818
perfect - great job!
0
 

Author Comment

by:Frank Freese
ID: 39651853
HarryHYLee,
By the way, what did you use to capture the image?
0
 
LVL 12

Expert Comment

by:Harry Lee
ID: 39651974
1) What I did was change the column width, and row height of the columns and rows around the area you want to show.

2) Set border for better looking, Then, select the area that surround the info you want to show. (Make sure you select one row above and one column left of the area you want to capture the borders.

3) Copy using Ctrl-C. Open up a photo editor (I used Paint). Enlarge the picture so that the whole copied area can show properly on the picture. Paste the clipboard into onto the image.

4) Save it as JPEG.

5) Go back to Excel and use VBA Editor to create a UserForm. Again, make sure the UserForm is big enough. Insert a Frame. Enlarge the frame to at least the width of the image + space for a vertical scroll bar.

6) Insert Picture inside the frame, and insert a scroll bar inside the frame.

7) Finally, setup code of the scroll bar to scroll the image inside the frame.
0
 

Author Comment

by:Frank Freese
ID: 39651993
thanks for the follow-up
have a safe weekend
0

Featured Post

Revamp Your Training Process

Drastically shorten your training time with WalkMe's advanced online training solution that Guides your trainees to action.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

You need to know the location of the Office templates folder, so that when you create new templates, they are saved to that location, and thus are available for selection when creating new documents.  The steps to find the Templates folder path are …
Access developers frequently have requirements to interact with Excel (import from or output to) in their applications.  You might be able to accomplish this with the TransferSpreadsheet and OutputTo methods, but in this series of articles I will di…
This Micro Tutorial will demonstrate on a Mac how to change the sort order for chart legend values and decrpyt the intimidating chart menu.
This Micro Tutorial will demonstrate how to use longer labels with horizontal bar charts instead of the vertical column chart.

623 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question