×
INTELLIGENT WORK FORUMS
FOR ENGINEERING PROFESSIONALS

Log In

Come Join Us!

Are you an
Engineering professional?
Join Eng-Tips Forums!
  • Talk With Other Members
  • Be Notified Of Responses
    To Your Posts
  • Keyword Search
  • One-Click Access To Your
    Favorite Forums
  • Automated Signatures
    On Your Posts
  • Best Of All, It's Free!
  • Students Click Here

*Eng-Tips's functionality depends on members receiving e-mail. By joining you are opting in to receive e-mail.

Posting Guidelines

Promoting, selling, recruiting, coursework and thesis posting is forbidden.

Students Click Here

Jobs

Programming using Visual Basic

Programming using Visual Basic

Programming using Visual Basic

(OP)
Hello

I am a structural engineer and not very familiar with programming languages.  I wrote a program using Visual Basic.  Then I made it into an *.exe file.  Then when I try to run.  If I am running in computers which is installed with visual basic or matlab it works.  But when I try to run in some computers without Matlab or Visual Basic, I get an error message saying 'ActiveX component can't create object'.  But in my commands I haven't use any create object command.  Sometimes in computers installed with Visual Basic it also doesn't run and an error message comes highlighting -
Dim xl As Excel.Application
with error message 'user-defined cannot be recognised'.  When I go to Project-References and tick the checkbox Microsoft Excel Object Library 10.0 and click O.K, the program runs.

The following is part of the program I consider should be wrong somewhere.
Dim xl As Excel.Application
Private Sub cmdcalcstiff_Click()
Set xl = New Excel.Application
xl.Workbooks.Add
ActiveSheet.Cells(1, 1).Value = 58
xl.Workbooks(1).SaveAs c:\Matrix.xls
xl.Workbooks(1).Close
xl.Quit
End Sub

Please somebody help me to run the *.exe file in any computers without any error messages all the time.

Thank you.

RE: Programming using Visual Basic

I have answered in your duplicate thread on Tek-Tips

Good Luck
johnwm
________________________________________________________
To get the best from these forums read FAQ731-376 before posting

Steam Engine enthusiasts: www.essexsteam.co.uk

Red Flag This Post

Please let us know here why this post is inappropriate. Reasons such as off-topic, duplicates, flames, illegal, vulgar, or students posting their homework.

Red Flag Submitted

Thank you for helping keep Eng-Tips Forums free from inappropriate posts.
The Eng-Tips staff will check this out and take appropriate action.

Reply To This Thread

Posting in the Eng-Tips forums is a member-only feature.

Click Here to join Eng-Tips and talk with other members!


Resources