Confused about VB and VBA help.

Confused about VB and VBA help.

sanganaksakha
Advocate Advocate
467 Views
7 Replies
Message 1 of 8

Confused about VB and VBA help.

sanganaksakha
Advocate
Advocate
Hi,

When I press F1 key inside VBA IDE, I’m taken to the VB help and not VBA help.

Now is everything shown in this help is available in VBA? Not as far as I know.

Everything in VB is not available in VBA.
So, shouldn’t I be seeing VBA help instead of VB help.

Or am I missing something here.

- Sanjay Kulkarni.
0 Likes
468 Views
7 Replies
Replies (7)
Message 2 of 8

Ed__Jobe
Mentor
Mentor
No, you're not missing anything. That's the way it is. I've never had a problem with it. But like any documentation, nothing is perfect. If you have any concerns about accuracy, go to www.msdn.com for the latest info.

Ed


Did you find this post helpful? Feel free to Like this post.
Did your question get successfully answered? Then click on the ACCEPT SOLUTION button.
How to post your code.

EESignature

0 Likes
Message 3 of 8

dgorsman
Consultant
Consultant
It *says* Visual Basic help, but its all for VBA. I haven't found anything in the help that is *not* applicable to VBA, and I haven't found anything in there that is specific to VB only. Care to provide some examples?
----------------------------------
If you are going to fly by the seat of your pants, expect friction burns.
"I don't know" is the beginning of knowledge, not the end.


0 Likes
Message 4 of 8

Anonymous
Not applicable
If you hit F1 when parked over a VB/VBA function that is applicable to all
VB/VBA forms, e.g. the .Show method, it pops up Visual Basic Reference.
Then, if you search in it for an AutoCAD specific feature, such as the
.GetPoint method, it doesn't find anything. But if you hit F1 when parked
on an AutoCAD specific feature, it opens the "AutoCAD ActiveX and VBA
Reference" Help. So you have to have an idea of where the feature you are
interested in lies, generic VB/VBA or application specific. It annoys me
sometimes too. I think that may be what the OP is referring to.


wrote in message news:5648239@discussion.autodesk.com...
It *says* Visual Basic help, but its all for VBA. I haven't found anything
in the help that is *not* applicable to VBA, and I haven't found anything in
there that is specific to VB only. Care to provide some examples?
0 Likes
Message 5 of 8

Anonymous
Not applicable
"Visual Basic for Applications (VBA) is the language used to program in Visual Basic (VB). VB itself is a development environment; the language element of that environment is VBA."
"The VBA language (with a very few minor exceptions) is the same whether you're programming within VB or creating an application in a hosted VBA environment"
from "VB & VBA in a NUTSHELL" by Paul Lomax
0 Likes
Message 6 of 8

dgorsman
Consultant
Consultant
Good point. Although I do like the separation between the AutoCAD object model and the VBA language reference - duplicated information quickly gets unsynchronized.
----------------------------------
If you are going to fly by the seat of your pants, expect friction burns.
"I don't know" is the beginning of knowledge, not the end.


0 Likes
Message 7 of 8

sanganaksakha
Advocate
Advocate
Thanks for all the answers.

I should have been more specific. I was talking about things specific to VB / VBA and not AutoCAD.

For example, while the following code works perfectly in VB6:

Sub main()

Load Form1

Form1.Visible = True

End Sub

similar code in AutoCAD VBA:


Sub try()

Load UserForm1

UserForm1.Visible = True

End Sub

Results in ‘Compile error - Function or interface marked as restricted, or the function uses an Automation type not supported in Visual Basic.’.


Its no big deal. But it is annoying and confusing. Unnecessary time may be wasted in finding out what works.

It would have been better if what works in VBA had been explicitly mentioned.

Its about user-friendliness and not about any technical point.

- Sanjay Kulkarni

=========
0 Likes
Message 8 of 8

Anonymous
Not applicable
that is one of the anomalies between the two environments. forms in VB are
called Form1 and UserForm1 in VBA. most developers don't use Load (...) but
instead use Form1.Show and UserForm1.Show respectively. By and large the
Visual Basic language is the same between the two environments.

joe ...


wrote in message news:5650023@discussion.autodesk.com...
Thanks for all the answers.

I should have been more specific. I was talking about things specific to VB
/ VBA and not AutoCAD.

For example, while the following code works perfectly in VB6:

Sub main()

Load Form1

Form1.Visible = True

End Sub

similar code in AutoCAD VBA:


Sub try()

Load UserForm1

UserForm1.Visible = True

End Sub

Results in 'Compile error - Function or interface marked as restricted, or
the function uses an Automation type not supported in Visual Basic.'.


Its no big deal. But it is annoying and confusing. Unnecessary time may be
wasted in finding out what works.

It would have been better if what works in VBA had been explicitly
mentioned.

Its about user-friendliness and not about any technical point.

- Sanjay Kulkarni

=========
0 Likes