I am determined to learn and use VBA, and I can proudly announce that I just wrote, understood and edited my own firt bit!!! I am feeling very proud of myself.
Dammit - it was really. Really. Simple. But it is all my own work, and we have to start somewhere, right?
And it will be genuinely useful for me.
Code:
Sub FormatAsCurrency()
'
' FormatAsCurrency Macro
' Macro recorded 14/06/2006 by bryony
'
'
Selection.NumberFormat = "_(£* #,##0_);[Red]_(£* - #,##0;_(£* 0)"
End Sub
I have done better than that (I think.) I have created a Custom Menu so I don't need to worry about overwriting exsisting short cuts. However, I can now get to it by pressing Alt+M+C. Which I reckon is pretty cool.
Of course you know now that I will be in the Excel Questions forum often begging for help! But I promise I will always try to work things out for myself first.
Since posting that I recorded a couple more macros and adapted them in the VBE - which are slightly more complicated. Obe I am having a little trouble with at the mo, but I aim to have it sorted today.
Thank you. I am just reading through it now, and it is. It is addressing one problem I have already.
So far all my successes have been essetially adapted/bastardised versions of recorded Macros, but I am finding that a useful way to learn what the code means. It seems really weird to be basically learning a new language. Its like I have learned the 'language of Excel' (fumctions/arguments etc) and now I am starting from scratch again.
Well, keep at it mate. It's well worth the time taken to work out what's going on with the code and moving into writing your own code from scratch. Be careful if you're the only person at work who knows much about VBA. If that's you then be prepared to be "The Excel Guy" (that's not necessarily a bad thing of course £££££££££££)
We have a great community of people providing Excel help here, but the hosting costs are enormous. You can help keep this site running by allowing ads on MrExcel.com.
Allow Ads at MrExcel
Which adblocker are you using?
Disable AdBlock
Follow these easy steps to disable AdBlock
1)Click on the icon in the browser’s toolbar. 2)Click on the icon in the browser’s toolbar. 2)Click on the "Pause on this site" option.
Go back
Disable AdBlock Plus
Follow these easy steps to disable AdBlock Plus
1)Click on the icon in the browser’s toolbar. 2)Click on the toggle to disable it for "mrexcel.com".
Go back
Disable uBlock Origin
Follow these easy steps to disable uBlock Origin
1)Click on the icon in the browser’s toolbar. 2)Click on the "Power" button. 3)Click on the "Refresh" button.
Go back
Disable uBlock
Follow these easy steps to disable uBlock
1)Click on the icon in the browser’s toolbar. 2)Click on the "Power" button. 3)Click on the "Refresh" button.