Malcolm torishi
Board Regular
- Joined
- Apr 26, 2013
- Messages
- 219
I have the following code that drops a calendar value and 2 textbox values into a 3 cells on my spread sheet that then triggers an email to be sent if the total of the 3 values that are dropped is below a certain value, but what is happening is when the values get dropped rather than being dropped in one go they get dropped in one at a time, albeit it’s a split second between each drop.
What I would like the code to do is drop all 3 values in the cells at the same time so there’s no time lag, does any know how this can be done please
Thank you
Private Sub CommandButton1_Click()
Application.ScreenUpdating = False
ActiveWorkbook.Sheets("OUT").Activate
Range("AC5").Value = 1
Range("AO7").Select
Do
If IsEmpty(ActiveCell) = False Then
ActiveCell.Offset(1, 0).Select
End If
Loop Until IsEmpty(ActiveCell) = True
ActiveCell.Offset(0, 0) = Calendar1.Value
ActiveCell.Offset(0, 1) = TextBox1.Value
ActiveCell.Offset(0, 2) = TextBox2.Value
Range("AC5").Value = 0
Range("AB4").Select
Application.ScreenUpdating = True
End Sub
What I would like the code to do is drop all 3 values in the cells at the same time so there’s no time lag, does any know how this can be done please
Thank you
Private Sub CommandButton1_Click()
Application.ScreenUpdating = False
ActiveWorkbook.Sheets("OUT").Activate
Range("AC5").Value = 1
Range("AO7").Select
Do
If IsEmpty(ActiveCell) = False Then
ActiveCell.Offset(1, 0).Select
End If
Loop Until IsEmpty(ActiveCell) = True
ActiveCell.Offset(0, 0) = Calendar1.Value
ActiveCell.Offset(0, 1) = TextBox1.Value
ActiveCell.Offset(0, 2) = TextBox2.Value
Range("AC5").Value = 0
Range("AB4").Select
Application.ScreenUpdating = True
End Sub