hi,
anybody knows how to hide formulas and lock that cell with formula using a macro? is this possible to do for the entire worksheets of the workbook?
thanks,
stoey
hi,
anybody knows how to hide formulas and lock that cell with formula using a macro? is this possible to do for the entire worksheets of the workbook?
thanks,
stoey
Last edited by stoey; 10-08-2011 at 10:26 AM.
Off the top
![]()
Please Login or Register to view this content.
A possible way without looping the cells
![]()
Please Login or Register to view this content.
If you need any more information, please feel free to ask.
However,If this takes care of your needs, please select Thread Tools from menu above and set this topic to SOLVED. It helps everybody! ....
Also
اس کی مدد کرتا ہے اگر
شکریہ کہنے کے لئے سٹار کلک کریں
If you are satisfied by any members response to your problem please consider using the small Star icon bottom left of their post to show your appreciation.
thanks for the quick reply bob and maarcol,
i dont really know where to put the coding from Bob so i tried marcol's macro...I clicked Thisworkbook from the Microsoft Visual Basic Editor window and selected (General) followed by (Declarations) before placing the code...but it did not work...i can still see the formulas...i might be doing something wrong here...please help
regards,
stoey
The code should be in a standard module not the workbook module.
1/. In Excel press Alt+f11 this will open the VBa editor.
2/. Select the "Insert" tab > Module
3/. Paste all of the given code in the resultant pane/window.
4/. Save the file and close the VBa editor
5/. In Excel (2007) Developer > Macros.... select the one you need then Press "Run"
alright just did your instructions marcol and i received an error message it says "Run time error 1004: no cells were found...any idea?
when i click on debug it points right here![]()
Please Login or Register to view this content.
Okay that means there are no formulae in that particular worksheet.
Try this code
![]()
Please Login or Register to view this content.
Last edited by Marcol; 10-08-2011 at 09:58 AM.
You can put this into any module (sheet, workbook or macro module)
Remove 'Option Explicit'
![]()
Please Login or Register to view this content.
Do you have any cells with formulas in them? If not then you are going to get an error message. You can get around this by adding:
right after the declarations, but you should be sure that this is your only problem before supressing all error messages.![]()
Please Login or Register to view this content.
Hope this helps.
abousetta
Please consider:
Thanking those who helped you. Click the star icon in the lower left part of the contributor's post and add Reputation.
Cleaning up when you're done. Mark your thread [SOLVED] if you received your answer.
I have to learn to type faster. My post is just a redundancy of what Marcol already said.
abousetta
whoa! i was so overwhelm with all of you guys thank you very much for helping me...
@ snb
There are many authoritative Excel coders that consider that to be bad practice.You can put this into any module (sheet, workbook or macro module)
Remove 'Option Explicit'
I consider it to be a superstition.
Arguments can convince me, authority can't.
Last edited by snb; 10-08-2011 at 04:45 PM.
_
...How to Cross-post politely...
..Wrap code by selecting the code and clicking the # or read this. Thank you.
@ snb
I look forward to your treatise on this subject, on the back of a postage stamp should suffice.
@ mikerickson if you can't spell "j" what hope is there for you? ...![]()
Its not a lack of hope that misspells J, its an excess of hop.
Beer? ... yum yum! ... burp ......
![]()
There are currently 1 users browsing this thread. (0 members and 1 guests)
Bookmarks