ExcelBanter

ExcelBanter (https://www.excelbanter.com/)
-   Excel Programming (https://www.excelbanter.com/excel-programming/)
-   -   Open an Excel file to a specific spreadsheet (https://www.excelbanter.com/excel-programming/351461-open-excel-file-specific-spreadsheet.html)

Fatmosh

Open an Excel file to a specific spreadsheet
 
On a certain slide of a PowerPoint presentation, I want the user to be
able to click on a link that will open an Excel file in the same
directory. That's no problem.

However, I want the link to be able to specify which Sheet in the Excel
file is brought to focus on open, so that in one link File A opens to
Sheet 1, but when they click another link File A opens to Sheet2.

Is this possible?

Thanks for any help whatsoever :-)


Tom Ogilvy

Open an Excel file to a specific spreadsheet
 
It would be easiest to make separate files.

--
Regards,
Tom Ogilvy

"Fatmosh" wrote in message
oups.com...
On a certain slide of a PowerPoint presentation, I want the user to be
able to click on a link that will open an Excel file in the same
directory. That's no problem.

However, I want the link to be able to specify which Sheet in the Excel
file is brought to focus on open, so that in one link File A opens to
Sheet 1, but when they click another link File A opens to Sheet2.

Is this possible?

Thanks for any help whatsoever :-)




Fatmosh

Open an Excel file to a specific spreadsheet
 
Ideally, yes, I would do that. But if I am unable to create new Excel
files...


Fatmosh

Open an Excel file to a specific spreadsheet
 
I found that the syntax is to put

#[SheetName]![Cell] after the link, so...

File.xls#Sheet2!A1

However, I don't think this works if you have either spaces or
parenthesis in the title of the sheet (which I have both).

Anyone know how to make this work?


Tom Ogilvy

Open an Excel file to a specific spreadsheet
 
Your talking about a hyperlink now. I thought you were talking about an
embedded object.

Insert the hyperlink and browse to the location. I would think this
"wizard" would get it correct.
--
Regards,
Tom Ogilvy

"Fatmosh" wrote in message
oups.com...
I found that the syntax is to put

#[SheetName]![Cell] after the link, so...

File.xls#Sheet2!A1

However, I don't think this works if you have either spaces or
parenthesis in the title of the sheet (which I have both).

Anyone know how to make this work?




Fatmosh

Open an Excel file to a specific spreadsheet
 
Well, it is a hyperlink, but it has some "extra" information at the end
to tell it which sheet of the Excel file to open (otherwise it just
opens to whichever was in-focus at the last save).

Like I said, I can get it to work when the sheet name does not have
spaces or parenthesis. However, when it does I get a "Reference is not
valid" error after the sheet opens.

(P.S. I tried replacing the space and parenthesis with %20, %28, and
%29, respectively. Still didn't work.)


Fatmosh

Open an Excel file to a specific spreadsheet
 
Looks like a buddy of mine found the solution: Just put single quotes
around the sheet name.

So instead of:

#[SheetName]![Cell]

put...

#'[SheetName]'![Cell] or

#'Sheet with spaces (and parens)'!A1

Thanks for your help Tom :-)



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

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