Hello Guest it is March 28, 2024, 06:52:05 PM

Author Topic: vba and vb-differences  (Read 3317 times)

0 Members and 1 Guest are viewing this topic.

vba and vb-differences
« on: May 28, 2019, 03:24:14 AM »
hello all ,
It is cold in Johannesburg at the moment must be at least 18 degrees with a midday high of 24 to 26. Brrrrrr
Concurrently with many other projects i am trying to learn VBA.
Mach scripts are written in VB.
are there many significant differences?
Like what does doOEMbutton(169) translate to in plain english
Best regards

fred evans

think of the trees-- use both sides of the computer paper
Re: vba and vb-differences
« Reply #1 on: May 28, 2019, 03:52:51 AM »
Hi,
do yourself a favor, learn Lua instead.

Craig
'I enjoy sex at 73.....I live at 71 so its not too far to walk.'

Offline Tweakie.CNC

*
  • *
  •  9,196 9,196
  • Super Kitty
    • View Profile
Re: vba and vb-differences
« Reply #2 on: May 28, 2019, 04:16:50 AM »
Hi Fred,

As Craig suggests best to learn Lua and look toward the future.

The Mach3 scripts are written in Cypress Enable which is a subset of Visual Basic. It is almost identical to VB but, as you are aware, there are some important differences.

DoOemButton(169) is the equivalent of pressing an on-screen button which will close the current file.

You will find the OemButton codes and Cypress Enable documentation in the Members Documents section of the forum.

Tweakie.
PEACE
Re: vba and vb-differences
« Reply #3 on: May 28, 2019, 06:04:31 AM »
thank you chaps--
I dont know anything about lua but I will look it up. Unfortunenately I am past my sell by date
on learning new software -so i will probably give this issue a miss-
many thanks
fred evans
think of the trees-- use both sides of the computer paper

Offline Tweakie.CNC

*
  • *
  •  9,196 9,196
  • Super Kitty
    • View Profile
Re: vba and vb-differences
« Reply #4 on: May 28, 2019, 06:25:45 AM »
 :)
PEACE
Re: vba and vb-differences
« Reply #5 on: May 28, 2019, 08:04:44 AM »
Unfortunenately I am past my sell by date on learning new software ................

 ;D  ;D
I feel similarly.
But I prefer to consider it going through multiple substantial price reductions ... but still on the shelf.  ;D

 :)
Russ
Re: vba and vb-differences
« Reply #6 on: May 28, 2019, 10:44:51 AM »
russ- thanks for the reply

at my age (77) I am still running my company because inflation has eaten all my
savings so i think I will soon be "redundant stock" and put in the scrap bin. But thank
almighty God I am still healthy and strong and i actually enjoy the work once I have got
all the creaks and groans sorted out ( usually at about 9.00 am) then I am OK!!
Best regards

fred
think of the trees-- use both sides of the computer paper

Offline TPS

*
  •  2,501 2,501
    • View Profile
Re: vba and vb-differences
« Reply #7 on: May 28, 2019, 11:58:17 AM »
back to the Basic question.

if you have a look to this: http://www.machsupport.com/wp-content/uploads/2013/02/VBScript_Commands.pdf
Manual you will see that VBA and cypress VB script are very simular.

in this Manual: https://www.google.com/url?sa=t&rct=j&q=&esrc=s&source=web&cd=3&ved=2ahUKEwjC4uDXyr7iAhVb8aYKHdLyA6gQFjACegQIAxAC&url=https%3A%2F%2Fforum.strojirenstvi.cz%2Fdownload%2Ffile.php%3Fid%3D56730&usg=AOvVaw2suuC-ECkZF7kK6JRlQfjA

you will find all Mach3 specific functions. there are also examples for the most needed things in there.

anything is possible, just try to do it.
if you find some mistakes, in my bad bavarian english,they are yours.
Re: vba and vb-differences
« Reply #8 on: May 28, 2019, 07:04:58 PM »
thank you TPS
best regards

fred
think of the trees-- use both sides of the computer paper

Offline ger21

*
  • *
  •  6,295 6,295
    • View Profile
    • The CNC Woodworker
Re: vba and vb-differences
« Reply #9 on: May 28, 2019, 09:38:04 PM »
For practical purposes, Cypress Enable, VB, and VBA are all nearly identical.

The main differences will be the functions specific to the application you are writing for, Mach3 in this case.
Gerry

2010 Screenset
http://www.thecncwoodworker.com/2010.html

JointCAM Dovetail and Box Joint software
http://www.g-forcecnc.com/jointcam.html