Programming C, C++, Java, PHP, Ruby, Turing, VB
Computer Science Canada 
Programming C, C++, Java, PHP, Ruby, Turing, VB  

Username:   Password: 
 RegisterRegister   
 absolute beginner
Index -> Programming, Visual Basic and Other Basics -> Visual Basic Help
View previous topic Printable versionDownload TopicSubscribe to this topicPrivate MessagesRefresh page View next topic
Author Message
Ben




PostPosted: Sun May 08, 2005 6:42 pm   Post subject: absolute beginner

Hi. I'm am completely just beggining to use VB. I have used Turing before, but i know pretty well nothing about Visual Basic, but I would like to learn. But first, I'm having a problem. I was reading a tutorial that was posted, and I tried a small piece of code -msgbox ("hello")- and ten I hit f5 to run it. I then get this messege:

An unhandled exception of type 'System.Security.Policy.PolicyException' occurred in Unknown Module.

Additional information: Execution permission cannot be acquired.

Can anyone help me with this?
Sponsor
Sponsor
Sponsor
sponsor
GlobeTrotter




PostPosted: Sun May 08, 2005 8:05 pm   Post subject: (No subject)

first of all, it sgould be
VB:

Call MsgBox ("Hello")


But that wouldn't cause the error you have. I'm not really sure what to tell you. Are you doing it on a school computer?
Ben




PostPosted: Sun May 08, 2005 8:32 pm   Post subject: (No subject)

Nope, my home computer.
Maverick




PostPosted: Sun May 08, 2005 8:51 pm   Post subject: (No subject)

Thats vbecause your using the wrong command

Im not positive but i think its

Msgbox("Message", vbOkOnly, "Title")

Ill post the correct one tomorrow since im not positive
Maverick




PostPosted: Mon May 09, 2005 7:40 am   Post subject: (No subject)

Dim Response as Integer
Response = MsgBox(Message, Type, Title)
GlobeTrotter




PostPosted: Mon May 09, 2005 5:08 pm   Post subject: (No subject)

Maverick wrote:
Dim Response as Integer
Response = MsgBox(Message, Type, Title)


That's not necessary. Once can simply put
Call MsgBox ("Hello")
And it will work, assigning defaults to type and title.
diqua




PostPosted: Tue May 10, 2005 12:51 pm   Post subject: (No subject)

code:
msgbox "Hello"

should still work


other wise check your user permissions in the windows user control panel module
Maverick




PostPosted: Tue May 10, 2005 6:11 pm   Post subject: (No subject)

GlobeTrotter wrote:
Maverick wrote:
Dim Response as Integer
Response = MsgBox(Message, Type, Title)


That's not necessary. Once can simply put
Call MsgBox ("Hello")
And it will work, assigning defaults to type and title.


Ya but if he wanted to make changes to it, that way is more difficult
Sponsor
Sponsor
Sponsor
sponsor
Ben




PostPosted: Wed May 11, 2005 6:59 pm   Post subject: (No subject)

i tried all the codes you guys suggested, but its still coming up...
Ben




PostPosted: Wed May 18, 2005 3:24 pm   Post subject: (No subject)

i fixed it. Thanks for your help. now i just need to learn how to do anything lol
Display posts from previous:   
   Index -> Programming, Visual Basic and Other Basics -> Visual Basic Help
View previous topic Tell A FriendPrintable versionDownload TopicSubscribe to this topicPrivate MessagesRefresh page View next topic

Page 1 of 1  [ 10 Posts ]
Jump to:   


Style:  
Search: