• DİKKAT

    DOSYA İndirmek/Yüklemek için ÜCRETLİ ALTIN ÜYELİK Gereklidir!
    Altın Üyelik Hakkında Bilgi

CommandButton ile Chrome'da sayfa açmak.

Katılım
21 Şubat 2016
Mesajlar
24
Excel Vers. ve Dili
Office 365 for Mac Türkçe
Arakdaşlar merhaba,

Dün bir sorum olmuştu ve sitedeki arkadaşlar sağolsunlar hızlıca çözüm ürettiler. şimdi son bir sorunum kaldı. Aşağıdaki kod ile sadece explorer'da sayfa açılıyor. Bu kodu Chrome ile açılması için nasıl revize edebilirim bir destek alabilirsem çok mutlu olacağım.

Kod:

Private Sub CommandButton1_Click()
Dim URL As String
Dim HTML_Body As Object
Dim IE As Object
URL = "https://ebildirge.sgk.gov.tr/WPEB/amp/loginldap"
Set IE = CreateObject("InternetExplorer.Application")
With IE
.Navigate URL
.Visible = True
Do Until IE.ReadyState = 4: DoEvents: Loop
Do While IE.Busy: DoEvents: Loop
IE.Document.all("j_username").Value = Cells(1, "a")
IE.Document.all("isyeri_kod").Value = Cells(2, "a")
IE.Document.all("j_password").Value = Cells(2, "b")
IE.Document.all("isyeri_sifre").Value = Cells(2, "c")
End With
Set IE = Nothing
Set HTML_Body = Nothing
End Sub
 
Chrome tarayıcısı ile açmak için;
Kod:
Shell "C:\Program Files\Google\Chrome\Application\chrome.exe "https://ebildirge.sgk.gov.tr/WPEB/amp/loginldap", vbMaximizedFocus
Kod:
Call ActiveWorkbook.FollowHyperlink("https://ebildirge.sgk.gov.tr/WPEB/amp/loginldapt"
bu kod blogu ilede acılabilinir
Kod:
Private Declare Function ShellExecute _
  Lib "shell32.dll" Alias "ShellExecuteA" ( _
  ByVal hWnd As Long, _
  ByVal Operation As String, _
  ByVal Filename As String, _
  Optional ByVal Parameters As String, _
  Optional ByVal Directory As String, _
  Optional ByVal WindowStyle As Long = vbMinimizedFocus _
  ) As Long
Sub CommandButton1_Click()
Dim siteac As Long
siteac = ShellExecute(0, "Open", "https://ebildirge.sgk.gov.tr/WPEB/amp/loginldapt") = True
 
Geri
Üst