View Single Post
  #7   Report Post  
Posted to microsoft.public.excel.programming
Paul B[_6_] Paul B[_6_] is offline
external usenet poster
 
Posts: 135
Default "running..." message

Mike, yes it does the same thing but you don't have to copy and paste.
If you are unprotect the sheet to run your macro and then protecting it
after the code you could use user interface only to protect the sheet, then
your macros would run with the sheet protected like this,
Worksheets("2").Protect , userInterfaceOnly:=True
excel does not "remember" this when you close the workbook, so you could
call it on workbook open to set user interface to true



--
Paul B
Always backup your data before trying something new
Please post any response to the newsgroups so others can benefit from it
Feedback on answers is always appreciated!
Using Excel 2000 & 97
** remove news from my email address to reply by email **
"mike allen" wrote in message
...
great info. thanks. I use this type of code often:

sheets("1").range("a1").Copy 'this is a formula
sheets("2").range("c3").PasteSpecial Paste:=xlValues 'this needs to be

hard
number

i tried your way of:
sheets("2").range("c3").value=sheets("1").range("a 1").value
as a replacement. I assume this is exactly the same thing?

by not using ...Select or ...Copy makes program faster, but using:
sheets("2").protect
still flips to sheet2 (from sheet1 for instance), then back to sheet1.
i know i can use:
Application.ScreenUpdating = False
'code
Application.ScreenUpdating = True
but it seems the entire program would be more efficient if i didn't need
this at all, i.e. going to sheet2 would not occur upon:

sheets("2").protect
any ideas? thanks

"Paul B" wrote in message
...
Mike, you can do it like this

Application.ScreenUpdating = False
'your code here
Application.ScreenUpdating = True

or a better way would be to do it without selecting the sheets like this
Sheets("1").Range("B1").Value = Sheets("1").Range("A1").Value


--
Paul B
Always backup your data before trying something new
Please post any response to the newsgroups so others can benefit from it
Feedback on answers is always appreciated!
Using Excel 2000 & 97
** remove news from my email address to reply by email **
"mike allen" wrote in message
...
I have a routine that selects sheet after sheet doing various

commands
an
each sheet. I would prefer to NOT see the rapid flashing of sheet

after
sheet being selected/opened. Can I do this in the background (not
viewable), or at least have a "cover" that hides the flashing of sheet
selections that reads: "running, be patient, please."? thanks

sub manysheets()
sheets("1").select
'copy cell A1 and paste in B1
sheets("2").select
'copy cell A1 and paste in B1
sheets("3").select
'any various functions
end sub