r/visualbasic • u/whyyunozoidberg • Jul 02 '15
Making GUI, VBA needs to populate Excel sheet. I did all the work except this part, thought it would be cake. Is it even possible? First time using VBA. [Visual Studio 2012 + Office 2010]
So I'm making this GUI and I was under the impression the VBA could grab data from text boxes and put them in an excel sheet. After a lot of googling I'm getting the impression the VBA might not be able to do it, some show VB.Net can do it, others say I need to use some Microsoft add on / extension thing. Basically, I'm confused on what the real answer is. I did a lot of work already and I saved this for last because I thought it was going to be the easy part. I really don't want to start from scratch . Ideas? I'm using Visual Studio 2012 and Office 2010.
5
Upvotes
3
u/hdsrob Jul 02 '15
I think you are probably confusing the different languages involved, and the different methods available to work with office.
VBA is not used from Visual Studio, but is the scripting language built into Office, and used within Office (via Developer Tools).
VB.NET is the language used within VS, so if you are using VS, and created a new Windows Forms or WPF project, then you are using VB.NET.
You can certainly manipulate Excel from VB.NET:
http://www.visual-basic-tutorials.com/WriteToExcel2007.php