I would like to force people to fill out one particular cell. I figure I can make them fill it out if they can;t save or print until this cell is filled in. Is this possible?
THank you
I would like to force people to fill out one particular cell. I figure I can make them fill it out if they can;t save or print until this cell is filled in. Is this possible?
THank you
Hello Rainxking,
Here are 2 macros that enable or disable all menu Save and Print items. They very easy to use.
Using the Macros:
Enable the Menu Items
MenuSave (True)
MenuPrint (True)
Disable the Menu Items
MenuSave (False)
MenuPrint (False)
Macro Code:
_________________________________________________________________
Public Sub MenuSave(Enable As Boolean)
'////////////////////////////////////////////////////////'
'/
'/ - Worksheet Menu and Standard Menu -
'/ Enable or Disable Save and SaveAs Options
'/
'////////////////////////////////////////////////////////'
'Written April 25, 2005
'Author: Leith Ross
'E-mail: LeithRoss@aol.com
Dim Status
Dim CmdBar1 As CommandBar
Dim CmdBar2 As CommandBar
Set CmdBar1 = Excel.CommandBars("Worksheet Menu Bar").Controls("File").CommandBar
Status = Enable
For I = 1 To CmdBar1.Controls.Count
CtrlName = CmdBar1.Controls(I).Caption
If CtrlName = "&Save" Or Left(CtrlName, 4) = "Save" Then
CmdBar1.Controls(I).Enabled = Status
End If
Next I
Set CmdBar2 = Excel.CommandBars("Standard")
CmdBar2.Controls("Save").Enabled = Status
End Sub
_________________________________________________________________
Public Sub MenuPrint(Enable As Boolean)
'////////////////////////////////////////////////////////'
'/
'/ - Worksheet Menu and Standard Menu -
'/ Enable or Disable Print and Print Related Options
'/
'/ '////////////////////////////////////////////////////////'
'Written April 25, 2005
'Author: Leith Ross
'E-Mail: LeithRoss@aol.com
Dim Status
Dim CmdBar1 As CommandBar
Dim CmdBar2 As CommandBar
Status = Enable
Set CmdBar1 = Excel.CommandBars("Worksheet Menu Bar").Controls("File").CommandBar
CmdBar1.Controls("Page Set&up...").Enabled = Status
CmdBar1.Controls("&Print...").Enabled = Status
CmdBar1.Controls("Print Pre&view").Enabled = Status
'Disable Print Preview Icon
Set CmdBar2 = Excel.CommandBars("Standard")
CmdBar2.Controls("Print Preview").Enabled = Status
'Get Printer Icon ID since caption includes printer name
For I = 1 To CmdBar2.Controls.Count
Ctrl_ID = CmdBar2.Controls(I).Id
If Ctrl_ID = 2521 Then
CmdBar2.Controls(I).Enabled = Status
Exit For
End If
Next I
End Sub
_________________________________________________________________
Sincerely,
Leith Ross
There are currently 1 users browsing this thread. (0 members and 1 guests)
Bookmarks