XLsheet Button Control to Lauch form the Public Drive

I

IT Girl

I am using Office XP Professional, outlook 2002.

I am designing a custom form, using the contact template. In this template I
have used a button control on a tab in my contact form to launch an XL Sheet.

I originally wanted to imbed an xlsheet on the page in the template but I
couldn't get the code to work even with an amazing amount of help (thanks
again for all the notes Sue) to save the data. So I have opted for this
alternate solution.

The problem with this option is the command code launches the pre-set
XL-sheet from the D drive of my computer. This contact form design is to be
used on the public drive and I would need the code to instruct the XL-Sheet
to launch from the public drive so all who have access can get the same
information. Is this possible?

If it is easier to get working then I would go this route and forget my
original design. I have the code that launches from the D-drive for this
alternate option if it
helps? Can it be changed to launch an ex-sheet from the public drive? If So
HOW? Please help, I am very lost with codes and it is quite outside of my
edcutation levels.

Sub GroupINFO_Click

Set objExcelApp = Item.Application.CreateObject("Excel.Application")
objExcelApp.Workbooks.Open("GroupINFO.xls")
Set objExcelBook = objExcelApp.ActiveWorkbook
Set objExcelSheets = objExcelBook.Worksheets
Set objExcelSheet = objExcelBook.Sheets(1)
objExcelSheet.Activate
objExcelApp.Application.Visible = True

End Sub

-
IT Girl
 
K

Ken Slovak - [MVP - Outlook]

Just provide the path to that public drive instead of just "GroupINFO.xls".
How you address that path depends on whether the drive is a mapped network
drive or not. That's the easiest way. If the drive is mapped as Z: then you
can use "Z:\GroupINFO.xls" assuming that the worksheet is at the root of Z:.
If the drive isn't mapped then you'd use something like this:
"File://serverName\folderName\GroupINFO.xls"
 
I

IT Girl

It worked... Thanks so much!

Nicole

Ken Slovak - said:
Just provide the path to that public drive instead of just "GroupINFO.xls".
How you address that path depends on whether the drive is a mapped network
drive or not. That's the easiest way. If the drive is mapped as Z: then you
can use "Z:\GroupINFO.xls" assuming that the worksheet is at the root of Z:.
If the drive isn't mapped then you'd use something like this:
"File://serverName\folderName\GroupINFO.xls"
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top