VBA to c#??


Jul 18, 2022
Hey guys,
I recently build a cool program (my first so I think it's alright, thanks Root) with VBA It has bugs and stuff but it works for me.
I want to share it with my friends as my colleagues think it will save them time also (I save at least 1 hour per day at a conservative guess )
It collects user input from one form, loads another and collates the info in a paragraph at the end onto a word doc.
I believe I have to turn the program into an executable file to share it as a complete program (all in a nutshell kind of thing)
I want to know if c# is the program code I will need to transform the VBA
I have added extra stuff to the program (not because I need them but because I found it in youtube haha)
Any help or guidance before I embark on another language is appreciated
Cheers in advance,
Last edited:
I guess my main concern is that VBA places the data onto an excel sheet then just adds the words (strings) in the cells to create a paragraph
Can C# do this?
I have added a timer (to see how long it takes to open, operate and close the program) - for data collection only, not really needed
it opens an email and sends the collected time taken to that email - definitely not needed but used as a data collector
opens a word doc to utilise and complete the important task
shuts the program down itself and leaves the newly created word doc only
Can I do this with C#?
This is certainly an interesting issue.

Going by what you've described, I'd say it's probably best to share as a macro-enabled document. To turn it into a standalone programme, with none of the Office APIs, to then get it to continue to work with Word/Excel would be a huge challenge - plus VBA is a lot more beginner friendly than C# (I wouldn't even know where to begin with C stuff)

The thing with sharing programs is, these days Windows has a lot of built in safeguards as running untrusted code is a good vector for malware to be distributed. Even sharing it as a macro might cause some challenges but it's also a perfectly valid use of the Office software vs sharing random exe files and expecting them to run without issue.
Cheers root, too late, I have started learning C# - looks very similar with regards to building forms using the developer tools (I just gotta work out the language and translate my program!!. I just hope it is dynamic enough. Macros can't be shared easily on government computers (to many inbuilt safeguards to protect that ultimately slow the computers down a lot I think). As for malware- I wouldn't be in this pickle if I was good enough to design computer crap to be malicious, I would have my program done already!!
P.S. at a stretch, please take some credit for giving the nurses more time with their clients on my ward - Maybe even saving a life!!!! I couldn't / wouldn't have done it without your advice. Your input has been invaluable :)
Cheers all,