In addition to what nlarson said, move that code you want to call to its own sub instead of putting everything in the button handler. This will allow you to call the code from anywhere in the form without passing in arguments you don't have.
Few companies that installed computers to reduce the employment of clerks have realized their expectations.... They now need more and more expensive clerks even though they call them "Developers" or "Programmers."
I'm new to the programming world, but not the computer world. Anyway, I've just recently downloaded Visual Basic 2008 Express Edition, and so far I love it. However, I came across an old source file that's opensource on SourceForge.net and downloaded it. I was trying to upgrade the Project1.vbp using the VB2k8 Express upgrade wizard when it told me that the upgrade failed because the mdlFormHandling.bas file was missing. The problem is, I went into the folder and looked and it's not missing. It's right there. I took some screenshots to show you if anyone could please, please, please, please help me. I'm just a lowly college kid! No money for the big guns yet! >.<
I've got and tried to track through that filepath and.....nothing. I've done a system wide search and I don't have a file labelled "VB98" to try and find and get into to follow the rest of the path. I'm completely at a loss here. I thought that maybe it was looking for a library I didn't have so I went online and downloaded the libraries for VB2k8EE from microsoft's website and installed them, but unfortunately, I'm still having the same trouble....I can't copy the file's into the location because the location it's looking for them in doesn't seem exist and I'm not even sure what the full filepath would be because it gets cut off with the "\...\...\...\VB98\" and etc...I thank you for your response though.
thanks =)) its solved. as i run the code in macro it does not work but when i change it to a button it works =)) thanks for all the helps guys.
anw can i have some comments, my boss wants me to programe a excel programe to help them generate report. do you think i should do in spreadsheet or forms. which one would be presentable and more interactive??
I tend to use the Forms, sometimes just have a macro to call it.
(eg, Ctrl Q to call the form).
I find them easier and more adaptable.
Obviously for simple things like a column transfer or a set of create and save Sheets etc a Macro is easier, especially as you can use the recorder.
It really is a matter of choice, but I think the Forms a) look more professional, and b) imply you have done more work(even if you haven't), so it is better for workplace kudos.
Are you asking if the form can use data from the spreadsheet, manipulate it and then move it back to the same or different spreadsheet?
If so, then yes.
Something like ...
Dim Something as Int<br />
With ActiveWorkbook<br />
Sheets("Name of worksheet").Select<br />
Range ("A1").Select<br />
Something = Selection.Value<br />
Range ("B1").Select<br />
Selection.Value = Something<br />
Of course you can choose different sheets and manipulate the data or other things as required, this was just a simple example.
I am developing crystal reports in vb.net and used MS Access as database having password security, when i want to view reports in project it asked for password of database.
Now i want to avoid that step, so what kind of coding required to pass username and password to crystal report?
Hi Guys, is there a simple code that I can use. I have a database and I collect information using a query and I want to see all the columns that are in the query when I use a combo box drop down. I am a newbie to visual basic
Dim conn as New SqlConnection(connString)
Dim sql asString = "SELECT * FROM SomeTable"
Dim cmd As New SqlCommand(sql,conn)
Dim da As New SqlDataAdapter(cmd)
Catch ex As Exception
Assign the DataTable to the DataGridView Control's DataSource property:;