Select to view content in your preferred language

I need a help in VBA codes

1934
2
09-13-2011 09:10 PM
MOHAMMEDHABBOUB
Deactivated User
Hello everybody,

Because I have just started learning VBA language, I need some short VBA cods (5-6 lines) to be written between sub and end statements in order to do some very simple tasks in ArcMap 9.3 like (Hello world button) 🙂

   
PLZ Help
0 Kudos
2 Replies
KaiApel1
Deactivated User
Hi MOHAMMED,

for your example:

Here you find some sample code:
http://webhelp.esri.com/arcgisdesktop/9.2/index.cfm?TopicName=Sample_VBA_code

For displaying a message box you need only to place

MsgBox "Hello World", vbInformation & vbOKOnly, "Message" as codeline in the Click-Procedure.

Private Sub UIButtonControl1_Click()
       MsgBox "Hello World!", vbOKOnly + vbInformation, "Message"
End Sub

You would found a lot of samples at the esri-pages: http://edndoc.esri.com/arcobjects/

for beginners here you find a script: http://web.mit.edu/gis/www/programming_iap2006/

K. Apel
0 Kudos
MOHAMMEDHABBOUB
Deactivated User
thanks a lot
it's very helpful
0 Kudos