Userform Question

  • Thread starter Thread starter jnf40
  • Start date Start date
J

jnf40

I have a Userform that pops up when a cell is selected. Is there a way to
have the Userform NOT pop up if the cell is selected with code that reformats
that particular cell?
 
You probably have code in your sheet module that causes the pop up. It was
most likely put there for a reason by someone who designed the workbook. You
can get rid of the pop up by deleting the code, but I would check with the
author first.
 
If you're referring to code you wrote to perform the reformatting:
there's no need to select a cell to reformat it.
You could post the problem code for suggestions.

Tim
 
I designed the workbook, and yes I do have code in the sheet module that
causes the pop up. When cell B2 is selected the userform pops up. If the user
wants to clear the entriies they have made they click a button and it
reformats the row to it's original state, however when it does the procedure
of reformatting the row since cell B2 is selected during the reformat it
causes the userform to pop up. I was just wondering if there was a way to
keep the userform from popping up during the reformat process or if maybe I
could have the close button, the red X, in the upper right corner of the
userform be utilized through code.
Thanks
 
Show the code that does the reformatting. It should not require selecting
the cell.

Tim
 
Ok I checked the code and I can reformat the cells without selecting them,
however is there a way to lock and unlock cells without selecting them? I
have tried what I know and I get 'Unable to set the Locked property of the
Range class' message.
 
Ok I checked the code and I can reformat the cells without selecting them,
however is there a way to lock and unlock cells without selecting them? I
have tried what I know and I get 'Unable to set the Locked property of the
Range class' message.

If the sheet is protected then you'll have to unprotect it before
unlocking the cells and then relock it.

Tim
 
Back
Top