Click here to Skip to main content
12,698,939 members (22,677 online)
Rate this:
 
Please Sign up or sign in to vote.
Hi,

I know very little about VB. I Need to code for navigating a URL on clicking link button such that navigated URL will contain an Excel file and that file should open on clicking the link button.
Posted 7-Jul-11 1:03am
Updated 7-Jul-11 1:49am
v2
Comments
Prerak Patel 7-Jul-11 6:07am
   
Not clear. Elaborate more. Avoid txt speak in questions.
Rate this: bad
 
good
Please Sign up or sign in to vote.

Solution 1

Assuming this is a windows application (and URL is a little misleading in that respect), look at the System.Diagnostics.Process class[^]
Process.Start("F:\Temp\MySpreadSheet.xls")
  Permalink  
Rate this: bad
 
good
Please Sign up or sign in to vote.

Solution 3

Private Sub OpenExcelFileForEditing(ByVal OutputPath As String)
    Dim excel As Microsoft.Office.Interop.Excel.Application
    Dim wb As Microsoft.Office.Interop.Excel.Workbook

    Try
        excel = New Microsoft.Office.Interop.Excel.Application
        wb = excel.Workbooks.Open(OutputPath)
        excel.Visible = True
        wb.Activate()
        txtPath.Text = OutputPath
    Catch ex As COMException
        MessageBox.Show("Error accessing Excel: " + ex.ToString())
    Catch ex As Exception
        MessageBox.Show("Error: " + ex.ToString())
    End Try
End Sub
  Permalink  
v2

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)

  Print Answers RSS
Top Experts
Last 24hrsThis month


Advertise | Privacy | Mobile
Web02 | 2.8.170118.1 | Last Updated 7 Jul 2011
Copyright © CodeProject, 1999-2017
All Rights Reserved. Terms of Service
Layout: fixed | fluid

CodeProject, 503-250 Ferrand Drive Toronto Ontario, M3C 3G8 Canada +1 416-849-8900 x 100