too many macros

  • Thread starter Thread starter opiec
  • Start date Start date
O

opiec

Hi,

I've written an application that will be used to drive a loca
wrestling tournament. I have quit a bit of VB code with many macros.
The problem is the worksheet takes way too long to save. The peopl
running the tournament will be constantly going in and out of severa
worksheets (files) and it's real painful to wait around 20 seconds t
save each file after simply updating a cell or two.

Is there a way to write a special "save" macro that saves only the dat
in the cells and not the many macros that I have?

Thanks for your help
 
Nothing that allows you to separate the code from the worksheets in a single
workbook.

But have you thought about separating your code from your workbook?

You could create a toolbar that runs your macros against the active workbook.
Then you save just the workbook with the data.
 
How do you do this - is there anywhere I can read up on this technique?
BowMag
 
if you're writing about creating the interface to your macros:

I like the way John Walkenbach did it in his menumaker.xls workbook.
http://j-walk.com/ss/excel/tips/tip53.htm

It's easy to update and looks really professional.

And for toolbars, I like this:
http://groups.google.com/[email protected]

I think I'd try to build a few sanity checks into each macro to see if you stop
the user from running a macro that will break something if he/she isn't on the
correct worksheet.

if lcase(activesheet.range("a1").value) <> "yourstandardheaderhere" then
msgbox "wrong worksheet"
exit sub
end if

You could even check the name of the worksheets if they don't vary (much).
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Back
Top