Thread: Excel Question
View Single Post
Old 29-10-2006, 17:09   #6
jswalker2
Inactive
 
Join Date: Mar 2006
Posts: 5
jswalker2 will become famous soon enoughjswalker2 will become famous soon enoughjswalker2 will become famous soon enough
Re: Excel Question

Well i have just had a quick google and have found this

"VBA on the Mac is based on VB 5 (which is what Excel 97 on Windows was), whereas on the Windows side it is VB 6."

So as far as i can tell, the procedure would be exactly the same for both pc and mac, and they would be compatible between both systems.

To draw a button on the spreadsheet you will need to get the Forms toolbar up, and then select button and drag on out on the sheet. To attach a macro to it, right click on the button and click Assign Macro and then choose the macro you wish to use.

For clearing cells in vb, you can either record a macro, do what you need to do, and then stop the recording and it will write the code for you, or the vb code for it would be

Range("A1").Select
Selection.ClearContents

But you can choose whatever cells you need to, and repeat this as many times as needed until all of your cells have been cleared. To select a range of cells the code would be

Range("A1:B2").Select

The above code would select a group of four cells A1, B1, A2 and B2.

I hope that all helps, and i hope it works as i don't have a mac to test this on
jswalker2 is offline   Reply With Quote