I am looking to hire a freelancer for VB scripting. Below is an example of what I am trying to accomplish, it is well explained in this youtube video and I am looking do the same

https://youtu.be/mBQkQ0s-T_I?si=VeFwxWHR53IcaU8h

I entered the same as the you tube video but I got an error. the error is "Expecting an existing scalar var" . I put starts ******* next to where the error is. Please see below

Please apply only if you are familiar with this specific script. Thank you

‘#Language "WWB-COM"

Option Explicit

Sub Main
Begin Dialog UserDialog 400,203 ‘ Tite box %GRID:10,7,1,1

Text 30,14,90,14,"What are your hubbies?",.Text1

CheckBox 60,42,90,14,"Music",.CheckBox1
CheckBox 60,70,90,14,"Computers",.CheckBox2
CheckBox 60,105,90,14,"Cars",.CheckBox3

OKButton 60,154,90,21
CancelButton 210,154,90,21

End Dialog

Dim dlg As UserDialog
result = Dialog (dlgl) ***************************************
If result = -1 Then
SendKeys "music", True
If dlgl.computers=1 And dlgl.cars = 1 Then
SendKeys ", ",True
End If

End If

If dlgl.computers Then
SendKeys "computers", True
If dlgl.cars = 1 Then
SendKeys " and ", True
End If
End If

If dlgl.cars = 1 Then
SendKeys "cars", True
End If

SendKeys ".", True

End If

End Sub

Posted On: January 22, 2024 18:25 UTC
Category: Scripting & Automation
Skills:Visual Basic, Visual Basic for Applications

Country: United States

click to apply

Powered by WPeMatico