Uploaded July 2021 | Updated September 2026, 2 weeks ago
How to validate time entry in a textbox on a userform automatically using VBA.
Code for the first message when the user-form fires up:
Private Sub UserForm_Initialize()
MsgBox "Please enter time as hh:mm:ss," & vbCrLf & "for example, 09:30:30 or 15:20:45"
End Sub
Further details available at this web address: exceltrainingvideos.com/validate-time-entry-in-textbox-on-userform
How to validate time entry in a textbox on a userform automatically using VBA.
Code for the first message when the user-form fires up:
Private Sub UserForm_Initialize()
MsgBox "Please enter time as hh:mm:ss," & vbCrLf & "for example, 09:30:30 or 15:20:45"
End Sub
Further details available at this web address: exceltrainingvideos.com/validate-time-entry-in-textbox-on-userform










![Whatsapp Desktop Automation with VBA
How to automate Whatsapp Desktop to login, search for user, send message and attachment and logout.
Heres the complete macro or VBA code:
Option Explicit
Dim driver As New WebDriver
Sub LoginSearchUserSendMessageAttachmentViaWhatsapp()
Chrome Driver
Selenium
Selenium Wrapper
Dim keys As New SeleniumWrapper.keys
Dim filepath As String
filepath = C:exceltrainingvideos-12find-header-with-todays-date.xlsm
driver.Start chrome
driver.Get https://web.whatsapp.com/
driver.Window.Maximize
driver.Wait 5000
driver.Wait 2000
driver.FindElementByXPath(//span[@title = Dt]).Click
driver.Wait 1000
driver.SendKeys (keys.Tab + keys.Tab)
driver.Wait 1000
driver.SendKeys (Poonam Mobile)
driver.Wait 1000
driver.SendKeys (keys.Enter)
driver.FindElementByClass (_3FRCZ)
driver.SendKeys (Please study *the below attached file* for the class tomorrow.)
driver.Wait 1000
driver.SendKeys (keys.Enter)
driver.Wait 2000
driver.FindElementByXPath(//div[@title=Attach]).Click
driver.Wait 10000
driver.FindElementByXPath(//input[@accept=image/*,video/mp4,video/3gpp,video/quicktime]).SendKeys (filepath)
driver.Wait 2000 this wait time depends on the size of your file max 64 mb
driver.FindElementByXPath(//span[@data-icon = send]).Click
driver.Wait 1000
driver.FindElementByXPath(//div[@title = Menu]).Click
driver.FindElementByXPath(//div[@title=Log out]).Click
driver.Quit
End Sub Whatsapp Desktop Automation with VBA](https://i.ytimg.com/vi/kYcbEGYCABE/mqdefault.jpg)