![]() |
|
#1
|
|||
|
|||
![]()
I did some more work and found a solution that works.
It runs a check on Cell E5, changes its value to 50 if it is greater then 50 and then shows a message box to the user stating a change was made. Sub GreaterThenFifty() 'Name of macro Dim WeekNumber As Double 'Use Double instead in case a half a week is used. Double allows decimal points and larger values to be entered then Integer Dim WeekChange As Double 'Use Double instead in case a half a week is used. Double allows decimal points and larger values to be entered then Integer WeekNumber = ActiveSheet.Range("E5").Value If WeekNumber > 50 Then 'Check if WeekNumber is greater the 50 ActiveSheet.Range("E5").Value = 50 'Change Cell E5 to 50 if above statement is true Msg = "Week Number is greater then 50. Changed to 50." MsgBox Msg 'Inform the user of the change End If End Sub If this solution helped you please click the scales and raise my reputation. Last edited by Onihonker; 08-21-2008 at 01:16 PM. |
![]() |
|
![]() |
||||
Thread | Thread Starter | Forum | Replies | Last Post |
Office Basic 2007 Activation Problem | Dazza7 | Office | 0 | 07-30-2008 07:59 AM |
Need some basic help on Project | NewToProject | Project | 0 | 04-06-2008 07:03 AM |
Powerpoint and Visual Studio | ferrja | PowerPoint | 0 | 03-29-2006 08:21 AM |