ExcelBanter

ExcelBanter (https://www.excelbanter.com/)
-   Excel Programming (https://www.excelbanter.com/excel-programming/)
-   -   Button to open another embedded xls file (https://www.excelbanter.com/excel-programming/374379-button-open-another-embedded-xls-file.html)

Paul Dennis

Button to open another embedded xls file
 
I have an excel file which has a botton which when pressed performs an
action. However I need to add another action which is when pressed it checks
L24 and if the number is 1 then it will open up another xls form.

The difficulty is 1.xls will be emailed to people to complete and then 2.xls
will need to be embeded some how in 1.xls.

Hence can you embed one xls in another and then open it from a marco ?

hope this makes sence?

smw226

Button to open another embedded xls file
 
Hi Paul,

I am making the assumption that you you say "xls form" you actualy mean a
worksheet and not an actual Excel form.
Also, this example is only for one tab but can easilly be adapted to show
multiple tabs if need be.

In the On_click action f the button add the following at the appropriate
point:

Dim cell_L24 As Integer

Range("L24").Select
cell_L24 = ActiveCell.Value

If cell_L24 = 1 Then
Sheets("your_hidden_sheet_name").Visible = True
Else
Sheets("your_hidden_sheet_name").Visible = True
End IfBut the

Thanks

Simon

Paul Dennis wrote:
I have an excel file which has a botton which when pressed performs an
action. However I need to add another action which is when pressed it checks
L24 and if the number is 1 then it will open up another xls form.

The difficulty is 1.xls will be emailed to people to complete and then 2.xls
will need to be embeded some how in 1.xls.

Hence can you embed one xls in another and then open it from a marco ?

hope this makes sence?



Paul Dennis

Button to open another embedded xls file
 
is it possible to have the sheets not as hidden but as an actual xls file
within the original so when it is opened it can be saved independantly of the
main xls?

"smw226" wrote:

Hi Paul,

I am making the assumption that you you say "xls form" you actualy mean a
worksheet and not an actual Excel form.
Also, this example is only for one tab but can easilly be adapted to show
multiple tabs if need be.

In the On_click action f the button add the following at the appropriate
point:

Dim cell_L24 As Integer

Range("L24").Select
cell_L24 = ActiveCell.Value

If cell_L24 = 1 Then
Sheets("your_hidden_sheet_name").Visible = True
Else
Sheets("your_hidden_sheet_name").Visible = True
End IfBut the

Thanks

Simon

Paul Dennis wrote:
I have an excel file which has a botton which when pressed performs an
action. However I need to add another action which is when pressed it checks
L24 and if the number is 1 then it will open up another xls form.

The difficulty is 1.xls will be emailed to people to complete and then 2.xls
will need to be embeded some how in 1.xls.

Hence can you embed one xls in another and then open it from a marco ?

hope this makes sence?





All times are GMT +1. The time now is 12:03 PM.

Powered by vBulletin® Copyright ©2000 - 2025, Jelsoft Enterprises Ltd.
ExcelBanter.com