Click here to Skip to main content
15,887,214 members
Please Sign up or sign in to vote.
0.00/5 (No votes)
See more:
Hi guys and girls. Quick question. If i'm exporting data from vb.net to excel and i want to add a macro to calculate a column's total, where would i do this? In visual studio or in Excel? And i someone can give me a hint of how the coding would look that would be super too.
Thanks in advance
Stay awesome :D
Posted
Comments
LittleYellowBird 17-Aug-11 6:36am    
"Stay awesome" ... thank you, I will! :)

If you want to create a macro using VB.Net, see this useful article[^].
 
Share this answer
 
Comments
Ace_Hardlight 17-Aug-11 6:44am    
yeah i tried that but it keeps giving me errors.
oModule = oBook.VBProject.VBComponents.Add(VBIDE.vbext_ComponentType.vbext_ct_StdModule)

Programmatic access to Visual Basic Project is not trusted
If you run into an error, try googling it:
google[^]

One of those may help you solve the issue.
 
Share this answer
 

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)



CodeProject, 20 Bay Street, 11th Floor Toronto, Ontario, Canada M5J 2N8 +1 (416) 849-8900