Home |
Search |
Today's Posts |
#1
Posted to microsoft.public.excel.programming
|
|||
|
|||
Command Button Changes Data Each Time It Is Pressed - Want it to workonce per worksheet.
I want to prevent a user from accidentally changing the data more than
once but keep in mind the worksheet is copied every day on to a new tab with the current date on it (so it must be prevented only on that worksheet). Here is the current code: Private Sub CommandButton58_Click() Range("P203:S232").Select Selection.Copy Range("P202:S231").Select ActiveSheet.PasteSpecial Format:=3, Link:=1, DisplayAsIcon:=False, _ IconFileName:=False ActiveSheet.Select ActiveWorkbook.SendMail Recipients:=Range("i12", "i13"), Subject:=Range("i11") ActiveWindow.SelectedSheets.PrintOut Copies:=1, Collate:=True End Sub I was thinking of adding code that would check a cell value, if blank then change to "Done" and copy the range, if not blank (i.e., if user clicks again) then skip copying of cell range. How do I write this and is this a good way to do it? Thanks! |
Thread Tools | Search this Thread |
Display Modes | |
|
|
Similar Threads | ||||
Thread | Forum | |||
Enter button jumps to next cell each time its pressed!!!! | Excel Discussion (Misc queries) | |||
Use A Command Button more than one time | Excel Programming | |||
Store data JUST entered in Activecell after clicking command button on worksheet | Excel Programming | |||
upload data from an excel worksheet to SQL W/ a command Button | Excel Programming | |||
Can't select macro button after other button is pressed | Excel Programming |