Popup new workbook w/ subset of data from original, workbook

jmichaelp

Board Regular
Joined
Aug 18, 2003
Messages
98
Hi, I'd like to create a popup that contains a subset of data from the open workbook when a user clicks on a cell. I want the functionality of a spreadsheet, so a userform won't work. I also want the new workbook to open up to a specified size each time. I don't need to save the newly opened workbook.


I assume my starting point would be:
Workbooks.Add xlWorksheet
and then refer to a template file set up the way I want. However, can a template be set up to open a workbook as a certain size??

Is there a better way to accomplish opening up a new worksheet (or something else)?

Thanks!
 

Excel Facts

Copy a format multiple times
Select a formatted range. Double-click the Format Painter (left side of Home tab). You can paste formatting multiple times. Esc to stop
Re: Popup new workbook w/ subset of data from original, work

jmichaelp said:
I want the functionality of a spreadsheet, so a userform won't work.

You can place a spreadsheet control in a userform. It has pretty much full functionality... really depends how much data you are wanting to show.

A bit more info would help.
 
Upvote 0
Re: Popup new workbook w/ subset of data from original, work

WillR - thanks for the quick reply! I haven't used the worksheet control in a userform, but will check it out.

In the meantime, I've got it using the following code:

Code:
Sub test()
Application.Workbooks.Add
With ActiveWindow
    .WindowState = xlNormal
    .Top = 1
    .Left = 1
    .Height = 300
    .Width = 300
End With
End Sub

I can then turn off all of the menus, shhet tabs etc. in code to just leave the cells. I assume I'll need a template file to which to refer that will house whatever vba I want to run in this popup window. Now I just need to stop this code from un-maximizing the currently open sheet...
 
Upvote 0

Forum statistics

Threads
1,214,975
Messages
6,122,538
Members
449,088
Latest member
RandomExceller01

We've detected that you are using an adblocker.

We have a great community of people providing Excel help here, but the hosting costs are enormous. You can help keep this site running by allowing ads on MrExcel.com.
Allow Ads at MrExcel

Which adblocker are you using?

Disable AdBlock

Follow these easy steps to disable AdBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the icon in the browser’s toolbar.
2)Click on the "Pause on this site" option.
Go back

Disable AdBlock Plus

Follow these easy steps to disable AdBlock Plus

1)Click on the icon in the browser’s toolbar.
2)Click on the toggle to disable it for "mrexcel.com".
Go back

Disable uBlock Origin

Follow these easy steps to disable uBlock Origin

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back

Disable uBlock

Follow these easy steps to disable uBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back
Back
Top