Jagat Pavasia
Active Member
- Joined
- Mar 9, 2015
- Messages
- 413
- Office Version
- 2021
- Platform
- Windows
dear sir,
I have VBA code Below :
It is working as it should, but I want that auto close tab of google chrome browser after it finished.
Not Fully close Browser, but only close web.whatsapp tab.
please help me to edit this
EDIT:
I also want that Start Minimized google Chrome Browser and Close tab After it done work
I have VBA code Below :
VBA Code:
Sub Send_Image_To_WhatsApp()
Dim whatsapp_number As String
Dim sh As Worksheet
Set sh = ThisWorkbook.Sheets("bill")
Dim i As Integer
For i = 42 To sh.Range("f" & Application.Rows.Count).End(xlUp).Row
If sh.Range("g" & i).Value <> "No" Then 'check skip
whatsapp_number = sh.Range("f" & i).Value
ThisWorkbook.FollowHyperlink "https://web.whatsapp.com/send?phone=%2B" & whatsapp_number & "&text=&app_absent=1&send=1"
Application.Wait (Now() + TimeValue("00:00:08"))
sh.Range("a1:h40").CopyPicture , xlBitmap
Application.Wait (Now() + TimeValue("00:00:08"))
VBA.SendKeys ("^v")
Application.Wait (Now() + TimeValue("00:00:01"))
VBA.SendKeys "~", True
Application.Wait (Now() + TimeValue("00:00:01"))
End If
Next i
MsgBox "OK", vbInformation
End Sub
It is working as it should, but I want that auto close tab of google chrome browser after it finished.
Not Fully close Browser, but only close web.whatsapp tab.
please help me to edit this
EDIT:
I also want that Start Minimized google Chrome Browser and Close tab After it done work
Last edited by a moderator: