Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.misc
external usenet poster
 
Posts: 361
Default lock button after click

Hi Guys Dolls

I have a worksheet which is used for master data input - there is a Button
which when clicked generates a "Form" number via a Macro assigned to the
button. After generating the number I want to lock the button. I cannot use
Sheet Protect as I use it at the end of the worksheet when the last user
completes their input the Sheet protection is called via a Macro assigned to
a different button. the button is in Cell I5.

please could you assit with VBA code which would lock the Button after
number generation but leave the rest of the sheet unprotected for data entry.

Many thanks

Carl
  #2   Report Post  
Posted to microsoft.public.excel.misc
external usenet poster
 
Posts: 8,520
Default lock button after click

Use the Enabled property...as below after the macro is called

Private Sub CommandButton1_Click()
Run "Macro"
CommandButton1.Enabled = False
End Sub

If this post helps click Yes
---------------
Jacob Skaria


"Carl" wrote:

Hi Guys Dolls

I have a worksheet which is used for master data input - there is a Button
which when clicked generates a "Form" number via a Macro assigned to the
button. After generating the number I want to lock the button. I cannot use
Sheet Protect as I use it at the end of the worksheet when the last user
completes their input the Sheet protection is called via a Macro assigned to
a different button. the button is in Cell I5.

please could you assit with VBA code which would lock the Button after
number generation but leave the rest of the sheet unprotected for data entry.

Many thanks

Carl

Reply
Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Posting Rules

Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On


Similar Threads
Thread Thread Starter Forum Replies Last Post
how do I undo the scroll lock, thscroll lock button does not work scroll lock Excel Discussion (Misc queries) 3 July 19th 08 10:17 PM
lock command button jan Excel Worksheet Functions 0 June 17th 08 08:38 PM
Lock cell reference in formula, even when moved with click & drag Beads Excel Worksheet Functions 8 February 2nd 07 03:03 PM
How to lock worksheet and still able to click on grouped rows nathanelz Excel Worksheet Functions 1 July 18th 05 09:36 PM
How do I lock a radio button group if a N/A button is selected worry a lot Excel Discussion (Misc queries) 2 May 21st 05 08:33 PM


All times are GMT +1. The time now is 12:15 AM.

Powered by vBulletin® Copyright ©2000 - 2024, Jelsoft Enterprises Ltd.
Copyright ©2004-2024 ExcelBanter.
The comments are property of their posters.
 

About Us

"It's about Microsoft Excel"