Jobinkrishna
New Member
- Joined
- Feb 29, 2016
- Messages
- 2
Hi , I have a vba code to display pdf file in the web browser control when we click or select link from the listbox, its working fine with my pc but on another PC its automatically opening in “pdf adobe reader” instead of web browser. how can i change this to web browser? i cannot find the reason of this, please help!!
Code:
Private Sub ListBox1_Click()
Application.DisplayAlerts = False
Application.ScreenUpdating = False
On Error Resume Next
Dim AA1, AA2 As Variant
AA1 = UserForm6.Frame1.ListBox1.Text
AA2 = “C:\PO_Pfile\Temp1\Temp12.pdf”
FileCopy AA1, AA2
WebBrowser1.Navigate (AA1)
Workbooks(“PO_SFile”).Sheets(“Sheet2”).Range(“AP2”) = AA1
End Sub
Last edited by a moderator: