VBA coding help For status bar and screenupdating(Fixed)
Final Product Fixed:
Sub Update_Hours()
Dim CurrentState As String
CurrentState = Range("E4").Value
Dim NewState As String
NewState = Range("C4").Value
Application.StatusBar = "Updating hours for " & NewState
Application.ScreenUpdating = False
Range("E4:F21").Replace CurrentState, NewState
Application.ScreenUpdating = True
Application.StatusBar = False
End Sub
Quote: I need some help with coding.
I need to to reset the status bar to default and turn screenupdating back on.
The following is what I have:
Application.StatusBar = "Retrieving data on NewState"
Application.ScreenUpdating = False
Range("E4:F21").Replace CurrentState, NewState
Application.ScreenUpdating = True
Application.StatusBar = "running macro"
Note: yes this is for an assignment, but I have exhausted all my avenues. Just need someone to hint at where I'm going wrong.
The macro runs fine, giving me no errors; however when I submit the assignment I receive the following errors back from sams.cengage.com about the macro:
Error in subprocedure "Update_Hours": Should change the text of the status bar to "Updating hours for " NewState.
Error in subprocedure "Update_Hours": Should reset the text of the status bar to its default value (set to "False").
Thank you for any help you can give!!
May Lindler
Recent comments
5 years 41 weeks ago
6 years 27 weeks ago
6 years 39 weeks ago
6 years 42 weeks ago
6 years 43 weeks ago
6 years 48 weeks ago
7 years 4 weeks ago
7 years 5 weeks ago
7 years 5 weeks ago
7 years 5 weeks ago