ExcelBanter

ExcelBanter (https://www.excelbanter.com/)
-   Excel Programming (https://www.excelbanter.com/excel-programming/)
-   -   Open file on a specified Worksheet (https://www.excelbanter.com/excel-programming/316332-open-file-specified-worksheet.html)

Luis

Open file on a specified Worksheet
 
Hello.
How can i open a file on a certain worksheet?

Thanks
Luis

Tom Ogilvy

Open file on a specified Worksheet
 
What does that mean?

Do you want to import a text file into an existing sheet?

--
Regards,
Tom Ogilvy

"Luis" wrote in message
...
Hello.
How can i open a file on a certain worksheet?

Thanks
Luis




Luis

Open file on a specified Worksheet
 
No. I have a xls file with 2 sheets and i i have 2 options to open the same
file, and i want that when the user chooses one option the file opens and
displays the corresponding sheet.

Tom, maybe you could help me on another question. I want to open a txt file
on an FTP location. That FTP location has Username and password. Can i pass
these parameters on the opening command? The problem is that i need to put
the username and password everytime i open the file. The site is allready
added to Excel.

"Tom Ogilvy" wrote:

What does that mean?

Do you want to import a text file into an existing sheet?

--
Regards,
Tom Ogilvy

"Luis" wrote in message
...
Hello.
How can i open a file on a certain worksheet?

Thanks
Luis





Tom Ogilvy

Open file on a specified Worksheet
 
Private Sub Cmd_Sheet1_Click()
Dim bk as Workbook
Set bk = workbooks.Open(Filename:="MyFile.xls")
bk.Worksheets(1).Activate
end Sub

Private Sub Cmd_Sheet2_Click()
Dim bk as Workbook
Set bk = workbooks.Open(Filename:="MyFile.xls")
bk.Worksheets(2).Activate
end Sub


you can try the URL



You might look at this thread for other considerations (internet transfer
control, for example)

http://groups.google.com/groups?thre... icrosoft.com


--
Regards,
Tom Ogilvy


"Luis" wrote in message
...
No. I have a xls file with 2 sheets and i i have 2 options to open the

same
file, and i want that when the user chooses one option the file opens and
displays the corresponding sheet.

Tom, maybe you could help me on another question. I want to open a txt

file
on an FTP location. That FTP location has Username and password. Can i

pass
these parameters on the opening command? The problem is that i need to put
the username and password everytime i open the file. The site is allready
added to Excel.

"Tom Ogilvy" wrote:

What does that mean?

Do you want to import a text file into an existing sheet?

--
Regards,
Tom Ogilvy

"Luis" wrote in message
...
Hello.
How can i open a file on a certain worksheet?

Thanks
Luis








All times are GMT +1. The time now is 02:00 AM.

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