My macro won't return a text value to my userform and I don't know why.

jmpatrick

Active Member
Joined
Aug 17, 2016
Messages
477
Office Version
  1. 365
Platform
  1. Windows
Good morning.

I have code that runs from a button on a userform. The code works fine except for the first line. This line is supposed to send a status update to a text box on the userform. You'll notice there's also a second status update after the code runs. That one works fine, which is strange.

VBA Code:
Sub TestHLinkValidityAll()

    Settings.MessageReturn.Value = "Testing for broken Hyperlinks"

    Application.EnableEvents = False
    Application.ScreenUpdating = False
    Application.DisplayAlerts = False
     
    Sheets("Calendar").Select
    Application.GoTo Reference:="CalendarAssets"
    Call TestHLinkValidityAssets
    Application.GoTo Reference:="CalendarFloorsOrderNumberColumn"
    Call TestHLinkValidityFloorOrderNumber
    Application.GoTo Reference:="CalendarLooseLumberOrderNumberColumn"
    Call TestHLinkValidityLooseLumberOrderNumber
    Application.GoTo Reference:="CalendarRoofTrussesOrderNumberColumn"
    Call TestHLinkValidityRoofTrussOrderNumber
    
    Application.EnableEvents = True
    Application.ScreenUpdating = True
    Application.DisplayAlerts = True
    
    Settings.MessageReturn.Value = "Testing complete.  Cells with RED backgrounds have broken Hyperlinks."
    
End Sub
 

Excel Facts

Move date out one month or year
Use =EDATE(A2,1) for one month later. Use EDATE(A2,12) for one year later.
Does it help if you add Settings.Repaint after that line?
 
Upvote 0
Solution
Much as it sounds - it redraws the form. Sometimes if you change a form - especially if you turn screenupdating off - it doesn't always appear to update on screen immediately.
 
Upvote 0

Forum statistics

Threads
1,214,950
Messages
6,122,428
Members
449,083
Latest member
Ava19

We've detected that you are using an adblocker.

We have a great community of people providing Excel help here, but the hosting costs are enormous. You can help keep this site running by allowing ads on MrExcel.com.
Allow Ads at MrExcel

Which adblocker are you using?

Disable AdBlock

Follow these easy steps to disable AdBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the icon in the browser’s toolbar.
2)Click on the "Pause on this site" option.
Go back

Disable AdBlock Plus

Follow these easy steps to disable AdBlock Plus

1)Click on the icon in the browser’s toolbar.
2)Click on the toggle to disable it for "mrexcel.com".
Go back

Disable uBlock Origin

Follow these easy steps to disable uBlock Origin

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back

Disable uBlock

Follow these easy steps to disable uBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back
Back
Top