Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations SkipVought on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

opening a web-served excel file with vb

Status
Not open for further replies.

gmkfusion

Programmer
Feb 14, 2004
5
0
0
US
I have an application that uses a linked Excel file. Both need to be served from a web server. When running the application locally, the absolute or relative folder/file path works fine. How would I use a static hyperlink path to do the same thing?

Thank You In Advance
 
Not too sure what you are asking here??

If you want to create a hyperlink on your application or just get the XLS file with your app. If all you want to do is acqire the file from a webserver why dont you use the OpenURL method??
 
First, thank you for your reply JohnStep. I'm not sure how to use the OpenURL. But to explain in more detail. I have an executable and an Excel file. The Excel file is stored on a webserver with a static absolute path, link. My VB app is accessing a predefine range within the Excel file. I use the following to run the app with the Excel file locally and it runs fine, but now I must access the same Excel file from a webserver.

Private Sub Form_Unload(Cancel As Integer)

gstrPath=App.Path & "\Tire_to_Body_Sensitivity_Chart.xls"
If (FileExists(gstrPath) = False) Then
Call OLEerror
cdlg.FileName = ""
Do
cdlg.ShowOpen
gstrPath = cdlg.FileName
Loop Until cdlg.FileName <> ""
End If
gstrOLEchart=gstrPath & "!Modify Existing Product!complete"
End Sub

when I run locally, everything works fine. But when I try to access the Excel file on the server, it doesn't fucntion. I know I have to change the gstrPath=... line, but I do not have any ideal.

Thanks In Advance,
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top