Unable to post code !!!

Jaafar Tribak

Well-known Member
Joined
Dec 5, 2002
Messages
9,619
Office Version
  1. 2016
Platform
  1. Windows
I am trying to post some code (about 700 lines) but when I click the Submit Button or Preview, the page freezes and then either the page times out or I get the following message
"The message you have entered is too short. Please lengthen your message to at least 1 characters"

The code is correctly posted between code tags as it should be and I also made sure that I posted some text outside the code tags

Suspecting that the length of the code might be the isssue, I tried reducing the code down to 200 lines for testing but still no luck ... BTW, I did post lengthy code in the past without any issues

However, when I edit the code to displaying just a one liner messagebox, the post is submitted without any problems

I have tried Opera,IE and FireFox browsers with/without all add-Ons and firewall disabled

Could it be that a specific word within the code text is causing the problem (Code has lots of APIs and condtional compilation directives ) ? or is this a known bug ?

Regards
 
Last edited:
1300 Lines approx.
Code:
Option Explicit
Option Private Module
Dim BTN01, BTN02, BTN03, BTN04, BTN05, BTN06, BTN07, BTN08, BTN09, BTN10
Dim BTN11, BTN12, BTN13, BTN14, BTN15, BTN16, BTN17, BTN18, BTN19, BTN20
Dim BTN21, BTN22, BTN23, BTN24, BTN25, BTN26, BTN27, BTN28, BTN29, BTN30
Dim BTN31, BTN32, BTN33, BTN34, BTN35, BTN36, BTN37, BTN38, BTN39, BTN40
Dim BTN41, BTN42, BTN43, BTN44, BTN45, BTN46, BTN47, BTN48, BTN49, BTN50
Dim BTN51, BTN52, BTN53, BTN54, BTN55, BTN56, BTN57, BTN58, BTN59, BTN60
Dim BTN61, BTN62, BTN63, BTN64, BTN65, BTN66, BTN67, BTN68, BTN69, BTN70
Dim BTN71, BTN72, BTN73, BTN74, BTN75, BTN76, BTN77, BTN78, BTN79, BTN80
Dim BTN81, BTN82
Dim T As Range
Dim i
Dim BUILT
Sub BTN01A()
    SURNAME_CLICK
    Application.StatusBar = vbNullString
End Sub
Sub BTN02A()
    CALLSIGN_CLICK
    Application.StatusBar = vbNullString
End Sub
Sub BTN03A()
    PERSONNEL_CLICK
    Application.StatusBar = vbNullString
End Sub
Sub BTN04A()
    YEARMINUS_CLICK
    Application.StatusBar = vbNullString
End Sub
Sub BTN05A()
    YEARPLUS_CLICK
    Application.StatusBar = vbNullString
End Sub
Sub BTN06A()
    MONTHMINUS_CLICK
    Application.StatusBar = vbNullString
End Sub
Sub BTN07A()
    MONTHPLUS_CLICK
    Application.StatusBar = vbNullString
End Sub
Sub BTN08A()
    DAYMINUS_CLICK
    Application.StatusBar = vbNullString
End Sub
Sub BTN09A()
    DAYPLUS_CLICK
    Application.StatusBar = vbNullString
End Sub
Sub BTN10A()
    DRIVINGLICENCE_CLICK
    Application.StatusBar = vbNullString
End Sub
Sub BTN11A()
    DRIVINGHX_CLICK
    COMMANDBUTTONHX_CLICK
    Application.StatusBar = vbNullString
End Sub
Sub BTN12A()
    TODAY_CLICK
    Application.StatusBar = vbNullString
End Sub

Sub BTN13A()
    RECTANGLE22_CLICK
    Application.StatusBar = vbNullString
End Sub

Sub BTN14A()
    GETFLEET
    Application.StatusBar = vbNullString
End Sub

Sub BTN15A()
    VEHICLETRACKER_CLICK
    Application.StatusBar = vbNullString
End Sub

Sub BTN16A()
    FLEETLOOKUP_CLICK
    Application.StatusBar = vbNullString
End Sub

Sub BTN17A()
    CPUNITHISTORY_CLICK
    Application.StatusBar = vbNullString
End Sub

Sub BTN18A()
    CI
    Application.StatusBar = vbNullString
End Sub

Sub BTN19A()
    EN
    BTN01A
    Application.StatusBar = vbNullString
End Sub

Sub BTN20A()
    EOC2
    BTN01A
    Application.StatusBar = vbNullString
End Sub

Sub BTN21A()
    On Error GoTo ErrBTN21A
    'BUILT = "http://www.streetmap.co.uk/newdefaulte2.htm"
    'BUILT = "http://www.mylondonmap.com/"
    BUILT = "https://www.google.co.uk/maps/preview"
    ActiveWorkbook.FollowHyperlink Address:=BUILT, NewWindow:=True
    Application.StatusBar = vbNullString
    Exit Sub
ErrBTN21A:
    Call MsgBox("No Connection Found", vbExclamation, "Internet")
    Application.StatusBar = vbNullString
End Sub

Sub BTN21B()
    On Error GoTo ErrBTN21B
    'BUILT = "http://www.streetmap.co.uk/newdefaulte2.htm"
    BUILT = "http://www.mylondonmap.com/"
    'BUILT = "https://www.google.co.uk/maps/preview"
    ActiveWorkbook.FollowHyperlink Address:=BUILT, NewWindow:=True
    Application.StatusBar = vbNullString
    Exit Sub
ErrBTN21B:
    Call MsgBox("No Connection Found", vbExclamation, "Internet")
    Application.StatusBar = vbNullString
End Sub

Sub BTN22A()
    PS
    BTN01A
    Application.StatusBar = vbNullString
End Sub

Sub BTN23A()
    INCIDENT
    Application.StatusBar = vbNullString
End Sub

Sub BTN24A()
    WHODEALS
    Application.StatusBar = vbNullString
End Sub

Sub BTN25A()
    RUNME
    Application.StatusBar = vbNullString
End Sub

Sub BTN26A()
    SORTALPHA
    Application.StatusBar = vbNullString
End Sub

Sub BTN27A()
    DIARYBA
    SORTALPHA
    Application.StatusBar = vbNullString
End Sub

Sub BTN28A()
    DIARYAA
    Application.StatusBar = vbNullString
End Sub

Sub BTN29A()
    COMMANDBUTTONHX_CLICK
    Application.StatusBar = vbNullString
End Sub

Sub BTN30A()
    OVERIDE
    Application.StatusBar = vbNullString
End Sub

Sub BTN31A()
    OVERRIDE
    Application.StatusBar = vbNullString
End Sub

Sub BTN32A()
    OVERRIDE
    Application.StatusBar = vbNullString
End Sub

Sub BTN33A()
    CREWS
    Application.StatusBar = vbNullString
End Sub

Sub BTN34A()
    DECELERATION
    Application.StatusBar = vbNullString
End Sub

Sub BTN35A()
    CLEARSTATDUMP
    Application.StatusBar = vbNullString
End Sub

Sub BTN36A()
    RUNSTATDUMP
    Application.StatusBar = vbNullString
End Sub

Sub BTN37A()
    IDC
    Application.StatusBar = vbNullString
End Sub

Sub BTN38A()
    REFRESHTHEFLEETLIST
    Application.StatusBar = vbNullString
End Sub

Sub BTN39A()
    RUNA
    Application.StatusBar = vbNullString
End Sub

Sub BTN40A()
    SETFLEETA
    Application.StatusBar = vbNullString
End Sub

Sub BTN41A()
    CLEARFLEET
    Application.StatusBar = vbNullString
End Sub

Sub BTN42A()
    RUNB
    Application.StatusBar = vbNullString
End Sub

Sub BTN43A()
    SETFLEETB
    Application.StatusBar = vbNullString
End Sub

Sub BTN44A()
    CLEARFLEET
    Application.StatusBar = vbNullString
End Sub

Sub BTN45A()
    PARTC
    Application.StatusBar = vbNullString
End Sub

Sub BTN46A()
    SERVICEDATA_CLICK
    Application.StatusBar = vbNullString
End Sub

Sub BTN47A()
    SETFLEETC
    Application.StatusBar = vbNullString
End Sub

Sub BTN48A()
    CLEARFLEET
    Application.StatusBar = vbNullString
End Sub

Sub BTN49A()
    RUND
    Application.StatusBar = vbNullString
End Sub

Sub BTN50A()
    SETFLEETD
    Application.StatusBar = vbNullString
End Sub

Sub BTN51A()
    CLEARFLEET
    Application.StatusBar = vbNullString
End Sub

Sub BTN52A()
    OVERIDE2
    Application.StatusBar = vbNullString
End Sub

Sub BTN53A()
    REFRESHBUT_CLICK
    Application.StatusBar = vbNullString
End Sub

Sub BTN54A()
    RUNE
    Application.StatusBar = vbNullString
End Sub

Sub BTN55A()
    IDR
    Application.StatusBar = vbNullString
End Sub

Sub BTN56A()
    ESCAPE
    Application.StatusBar = vbNullString
End Sub

Sub BTN57A()
    MOTORCYCLE
    Application.StatusBar = vbNullString
End Sub

Sub BTN58A()
    DATES
    Application.StatusBar = vbNullString
End Sub

Sub BTN59A()
    REFRESH
    Application.StatusBar = vbNullString
End Sub

Sub BTN60A()
    OUTSTANDING
    Application.StatusBar = vbNullString
End Sub

Sub BTN61A()
    REVERSE
    Application.StatusBar = vbNullString
End Sub

Sub BTN62A()
    DOIT
    Application.StatusBar = vbNullString
End Sub

Sub BTN63A()
    UNredact
    Sheets("Incident Report").Range("A16:J87").ClearContents
    INCIDENTx
    Application.StatusBar = vbNullString
End Sub

Sub BTN64A()
    QUICKCHECK
    Application.StatusBar = vbNullString
End Sub

Sub BTN65A()
    CIS
    Application.StatusBar = vbNullString
End Sub

Sub BTN66A()
    DESTRUCTION
    Application.StatusBar = vbNullString
End Sub

Sub BTN67A()
    Sheets("rtcfrontpage").Range("A5:H43").Select
    Selection.PrintOut copies:=1
    Application.StatusBar = vbNullString
End Sub

Sub BTN68A()
    On Error GoTo ErrBTN68A
    BUILT = "http://calllog/Search/Search.aspx"
    ActiveWorkbook.FollowHyperlink Address:=BUILT, NewWindow:=True
    Application.StatusBar = vbNullString
    Exit Sub
ErrBTN68A:
    Call MsgBox("No Connection Found", vbExclamation, "Internet")
    Application.StatusBar = vbNullString
End Sub

Sub BTN69A()
    FOI
    Application.StatusBar = vbNullString
End Sub

Sub BTN70A()
    On Error GoTo ErrBTN70A
    'need to launch GRS
    'Dim ProgramPath
    'Dim FileToLaunch
    'ProgramPath = "C:\grslive\"        'iexplore.exe"        ' works
    'FileToLaunch = "LiveGRS.exe"        ' does not work
    'Shell ProgramPath + FileToLaunch, vbNormalFocus
    Shell ("C:\grslive\livegrs.exe")
    Application.StatusBar = vbNullString

ErrBTN70A:
    Call MsgBox("No Connection Found", vbExclamation, "Internet")
    Application.StatusBar = vbNullString
End Sub

Sub BTN71A()
    On Error GoTo ErrBTN71A
    BUILT = "http://www.timeanddate.com/worldclock/astronomy.html?n=136"
    ActiveWorkbook.FollowHyperlink Address:=BUILT, NewWindow:=True
    Application.StatusBar = vbNullString
    Exit Sub
ErrBTN71A:
    Call MsgBox("No Connection Found", vbExclamation, "Internet")
    Application.StatusBar = vbNullString

End Sub

Sub BTN72A()
    On Error GoTo ErrBTN72A
    BUILT = "https://www.gov.uk/browse/driving/highway-code"
    ActiveWorkbook.FollowHyperlink Address:=BUILT, NewWindow:=True
    Application.StatusBar = vbNullString
    Exit Sub
ErrBTN72A:
    Call MsgBox("No Connection Found", vbExclamation, "Internet")
    Application.StatusBar = vbNullString

End Sub

Sub BTN73A()
    On Error GoTo ErrBTN73A
    BUILT = "https://www.gov.uk/driving-licence-codes"
    ActiveWorkbook.FollowHyperlink Address:=BUILT, NewWindow:=True
    Application.StatusBar = vbNullString
    Exit Sub
ErrBTN73A:
    Call MsgBox("No Connection Found", vbExclamation, "Internet")
    Application.StatusBar = vbNullString
End Sub

Sub BTN74A()
    On Error GoTo ErrBTN74A
    BUILT = "http://www.drivingtesttips.biz/driving-licence-explained.html"
    ActiveWorkbook.FollowHyperlink Address:=BUILT, NewWindow:=True
    Application.StatusBar = vbNullString
    Exit Sub
ErrBTN74A:
    Call MsgBox("No Connection Found", vbExclamation, "Internet")
    Application.StatusBar = vbNullString
End Sub
Sub BTN81A()
    On Error GoTo ErrBTN81A
    BUILT = "https://www.vehicleenquiry.service.gov.uk/"
    ActiveWorkbook.FollowHyperlink Address:=BUILT, NewWindow:=True
    Application.StatusBar = vbNullString
    Exit Sub
ErrBTN81A:
    Call MsgBox("No Connection Found", vbExclamation, "Internet")
    Application.StatusBar = vbNullString
End Sub
Sub BTN82A()
    On Error GoTo ErrBTN82A
    BUILT = "http://data/Pages/ReportViewer.aspx?Rpt=642"
    ActiveWorkbook.FollowHyperlink Address:=BUILT, NewWindow:=True
    Application.StatusBar = vbNullString
    Exit Sub
ErrBTN82A:
    Call MsgBox("No Connection Found", vbExclamation, "Internet")
    Application.StatusBar = vbNullString
End Sub
Sub BTN75A()
    PDF
    Application.StatusBar = vbNullString
End Sub

Sub BTN76A()
    redact
    Application.StatusBar = vbNullString
End Sub

Sub BUTTONS()
    BUTTONS1
    BUTTONS2
    BUTTONS3
    BUTTONS4
    BUTTONS5
    BUTTONS6
    BUTTONS7
    BUTTONS8
    BUTTONS9
    BUTTONS10
    BUTTONS11
    BUTTONS12
    BUTTONS13
    BUTTONS14
    BUTTONS15
    BUTTONS16
    BUTTONS17
    BUTTONS18
    BUTTONS19
    BUTTONS20
    BUTTONS21
    BUTTONS22
    BUTTONS23
    BUTTONS24
    BUTTONS25
    BUTTONS26
    BUTTONS27
    BUTTONS28
    BUTTONS29
    BUTTONS30
    BUTTONS31
    BUTTONS32
    BUTTONS33
    BUTTONS34
    BUTTONS35
    BUTTONS36
    BUTTONS37
    BUTTONS38
    BUTTONS39
    Application.StatusBar = vbNullString
End Sub

Sub BUTTONS1()
    Application.ScreenUpdating = False
    Sheets("REFERENCE LOOKUP").Rows("1:13").RowHeight = 15
    ActiveSheet.BUTTONS.Delete
    i = 1
    Set T = Sheets("REFERENCE LOOKUP").Range("A2:B4")
    Set BTN01 = Sheets("REFERENCE LOOKUP").BUTTONS.Add(T.Left, T.Top, T.Width, T.Height)
    With BTN01
        .OnAction = "BTN01A": .Caption = "Staff Name": .Name = "BTN" & i
    End With
    Set T = Sheets("REFERENCE LOOKUP").Range("A6:B8")
    Set BTN02 = Sheets("REFERENCE LOOKUP").BUTTONS.Add(T.Left, T.Top, T.Width, T.Height)
    With BTN02
        .OnAction = "BTN02A": .Caption = "Call Sign": .Name = "BTN" & i
    End With
    Set T = Sheets("REFERENCE LOOKUP").Range("A10:B12")
    Set BTN03 = Sheets("REFERENCE LOOKUP").BUTTONS.Add(T.Left, T.Top, T.Width, T.Height)
    With BTN03
        .OnAction = "BTN03A": .Caption = "Personnel No.": .Name = "BTN" & i
    End With
    Set T = Sheets("REFERENCE LOOKUP").Range("E1:F2")
    Set BTN04 = Sheets("REFERENCE LOOKUP").BUTTONS.Add(T.Left, T.Top, T.Width, T.Height)
    With BTN04
        .OnAction = "BTN04A": .Caption = "Year (-)": .Name = "BTN" & i
    End With
    Set T = Sheets("REFERENCE LOOKUP").Range("D4")
    Set BTN19 = Sheets("REFERENCE LOOKUP").BUTTONS.Add(T.Left, T.Top, T.Width, T.Height)
    With BTN19
        .OnAction = "BTN19A": .Caption = "Enhanced Name": .Name = "BTN" & i
    End With
    Set T = Sheets("REFERENCE LOOKUP").Range("D5")
    Set BTN20 = Sheets("REFERENCE LOOKUP").BUTTONS.Add(T.Left, T.Top, T.Width, T.Height)
    With BTN20
        .OnAction = "BTN20A": .Caption = "EOC Check": .Name = "BTN" & i
    End With
    Set T = Sheets("REFERENCE LOOKUP").Range("D6")
    Set BTN22 = Sheets("REFERENCE LOOKUP").BUTTONS.Add(T.Left, T.Top, T.Width, T.Height)
    With BTN22
        .OnAction = "BTN22A": .Caption = "Power Search": .Name = "BTN" & i
    End With

    Set T = Sheets("REFERENCE LOOKUP").Range("G1:H2")
    Set BTN05 = Sheets("REFERENCE LOOKUP").BUTTONS.Add(T.Left, T.Top, T.Width, T.Height)
    With BTN05
        .OnAction = "BTN05A": .Caption = "Year (+)": .Name = "BTN" & i
    End With
    Set T = Sheets("REFERENCE LOOKUP").Range("E3:F4")
    Set BTN06 = Sheets("REFERENCE LOOKUP").BUTTONS.Add(T.Left, T.Top, T.Width, T.Height)
    With BTN06
        .OnAction = "BTN06A": .Caption = "Month (-)": .Name = "BTN" & i
    End With
    Set T = Sheets("REFERENCE LOOKUP").Range("G3:H4")
    Set BTN07 = Sheets("REFERENCE LOOKUP").BUTTONS.Add(T.Left, T.Top, T.Width, T.Height)
    With BTN07
        .OnAction = "BTN07A": .Caption = "Month (+)": .Name = "BTN" & i
    End With
    Set T = Sheets("REFERENCE LOOKUP").Range("E6:F7")
    Set BTN08 = Sheets("REFERENCE LOOKUP").BUTTONS.Add(T.Left, T.Top, T.Width, T.Height)
    With BTN08
        .OnAction = "BTN08A": .Caption = "Day (-)": .Name = "BTN" & i
    End With
    Set T = Sheets("REFERENCE LOOKUP").Range("G6:H7")
    Set BTN09 = Sheets("REFERENCE LOOKUP").BUTTONS.Add(T.Left, T.Top, T.Width, T.Height)
    With BTN09
        .OnAction = "BTN09A": .Caption = "Day (+)": .Name = "BTN" & i
    End With


    Set T = Sheets("REFERENCE LOOKUP").Range("J1:K3")
    Set BTN12 = Sheets("REFERENCE LOOKUP").BUTTONS.Add(T.Left, T.Top, T.Width, T.Height)
    With BTN12
        .OnAction = "BTN12A": .Caption = "Today": .Name = "BTN" & i
    End With

    Set T = Sheets("REFERENCE LOOKUP").Range("M1:M2")
    Set BTN13 = Sheets("REFERENCE LOOKUP").BUTTONS.Add(T.Left, T.Top, T.Width, T.Height)
    With BTN13
        .OnAction = "BTN13A": .Caption = "Clear VRM / Fleet": .Name = "BTN" & i
    End With

    Set T = Sheets("REFERENCE LOOKUP").Range("M3")
    Set BTN82 = Sheets("REFERENCE LOOKUP").BUTTONS.Add(T.Left, T.Top, T.Width, T.Height)
    With BTN82
        .OnAction = "BTN82A": .Caption = "CommandPoint Vehicle Log": .Name = "BTN" & i
    End With

    Set T = Sheets("REFERENCE LOOKUP").Range("j4:k5")
    Set BTN71 = Sheets("REFERENCE LOOKUP").BUTTONS.Add(T.Left, T.Top, T.Width, T.Height)
    With BTN71
        .OnAction = "BTN71A": .Caption = "Sun Rise / Sun Set": .Name = "BTN" & i
    End With


    Set T = Sheets("REFERENCE LOOKUP").Range("e9:g10")
    Set BTN74 = Sheets("REFERENCE LOOKUP").BUTTONS.Add(T.Left, T.Top, T.Width, T.Height)
    With BTN74
        .OnAction = "BTN74A": .Caption = "Reading a" & vbLf & "Driving Licence": .Name = "BTN" & i
    End With
    Set T = Sheets("REFERENCE LOOKUP").Range("h9:j10")
    Set BTN81 = Sheets("REFERENCE LOOKUP").BUTTONS.Add(T.Left, T.Top, T.Width, T.Height)
    With BTN81
        .OnAction = "BTN81A": .Caption = "Vehicle Enquiry" & vbLf & "TAXED & MOT": .Name = "BTN" & i
    End With
    Set T = Sheets("REFERENCE LOOKUP").Range("k9:l10")
    Set BTN72 = Sheets("REFERENCE LOOKUP").BUTTONS.Add(T.Left, T.Top, T.Width, T.Height)
    With BTN72
        .OnAction = "BTN72A": .Caption = "Highway Code": .Name = "BTN" & i
    End With
    Set T = Sheets("REFERENCE LOOKUP").Range("E11:G12")
    Set BTN10 = Sheets("REFERENCE LOOKUP").BUTTONS.Add(T.Left, T.Top, T.Width, T.Height)
    With BTN10
        .OnAction = "BTN10A": .Caption = "Driving Licence" & vbLf & "Cross Check": .Name = "BTN" & i
    End With
    Set T = Sheets("REFERENCE LOOKUP").Range("H11:J12")
    Set BTN11 = Sheets("REFERENCE LOOKUP").BUTTONS.Add(T.Left, T.Top, T.Width, T.Height)
    With BTN11
        .OnAction = "BTN11A": .Caption = "Driving Hx": .Name = "BTN" & i
    End With
    Set T = Sheets("REFERENCE LOOKUP").Range("k11:l12")
    Set BTN73 = Sheets("REFERENCE LOOKUP").BUTTONS.Add(T.Left, T.Top, T.Width, T.Height)
    With BTN73
        .OnAction = "BTN73A": .Caption = "Driving Licence Codes": .Name = "BTN" & i
    End With
    Set T = Sheets("REFERENCE LOOKUP").Range("M9:M10")
    Set BTN68 = Sheets("REFERENCE LOOKUP").BUTTONS.Add(T.Left, T.Top, T.Width, T.Height)
    With BTN68
        .OnAction = "BTN68A": .Caption = "Call Log": .Name = "BTN" & i
    End With
    Set T = Sheets("REFERENCE LOOKUP").Range("N3:Q4")
    Set BTN14 = Sheets("REFERENCE LOOKUP").BUTTONS.Add(T.Left, T.Top, T.Width, T.Height)
    With BTN14
        .OnAction = "BTN14A": .Caption = "Fleet No from Reg No": .Name = "BTN" & i
    End With
    Set T = Sheets("REFERENCE LOOKUP").Range("N5:Q6")
    Set BTN15 = Sheets("REFERENCE LOOKUP").BUTTONS.Add(T.Left, T.Top, T.Width, T.Height)
    With BTN15
        .OnAction = "BTN15A": .Caption = "Vehicle Tracker / VEPlay": .Name = "BTN" & i
    End With
    Set T = Sheets("REFERENCE LOOKUP").Range("N7:Q8")
    Set BTN16 = Sheets("REFERENCE LOOKUP").BUTTONS.Add(T.Left, T.Top, T.Width, T.Height)
    With BTN16
        .OnAction = "BTN16A": .Caption = "MDT Last Location": .Name = "BTN" & i
    End With
    Set T = Sheets("REFERENCE LOOKUP").Range("N9:Q10")
    Set BTN17 = Sheets("REFERENCE LOOKUP").BUTTONS.Add(T.Left, T.Top, T.Width, T.Height)
    With BTN17
        .OnAction = "BTN17A": .Caption = "CommandPoint ""Unit"" Hx": .Name = "BTN" & i
    End With
    Set T = Sheets("REFERENCE LOOKUP").Range("N11:Q12")
    Set BTN18 = Sheets("REFERENCE LOOKUP").BUTTONS.Add(T.Left, T.Top, T.Width, T.Height)
    With BTN18
        .OnAction = "BTN18A": .Caption = "CI Equations (unhide)": .Name = "BTN" & i
    End With
    Set T = Sheets("REFERENCE LOOKUP").Range("N13:o13")
    Set BTN21 = Sheets("REFERENCE LOOKUP").BUTTONS.Add(T.Left, T.Top, T.Width, T.Height)
    With BTN21
        .OnAction = "BTN21A": .Caption = "Google Map": .Name = "BTN" & i
    End With
    Set T = Sheets("REFERENCE LOOKUP").Range("p13:Q13")
    Set BTN21 = Sheets("REFERENCE LOOKUP").BUTTONS.Add(T.Left, T.Top, T.Width, T.Height)
    With BTN21
        .OnAction = "BTN21B": .Caption = "My London": .Name = "BTN" & i
    End With

    ColourMe

    Application.StatusBar = vbNullString
End Sub

Sub BUTTONS2()
    Sheets("RTCFRONTPAGE").BUTTONS.Delete
    Application.ScreenUpdating = False
    Set T = Sheets("RTCFRONTPAGE").Range("B1")
    Set BTN23 = Sheets("RTCFRONTPAGE").BUTTONS.Add(T.Left, T.Top, T.Width, T.Height)
    With BTN23
        .OnAction = "BTN23A": .Caption = "FETCH": .Name = "BTN" & i
    End With
    Application.StatusBar = vbNullString
End Sub

Sub BUTTONS3()
    Sheets("WHO DEALS").BUTTONS.Delete
    Application.ScreenUpdating = False
    Sheets("WHO DEALS").Rows("1:1").RowHeight = 15
    Set T = Sheets("WHO DEALS").Range("D1")
    Set BTN24 = Sheets("WHO DEALS").BUTTONS.Add(T.Left, T.Top, T.Width, T.Height)
    With BTN24
        .OnAction = "BTN24A": .Caption = "FETCH": .Name = "BTN" & i
    End With
    Application.StatusBar = vbNullString
End Sub

Sub BUTTONS4()
    Sheets("RTC WITH PERSONNEL NO").BUTTONS.Delete
    Application.ScreenUpdating = False
    Sheets("RTC WITH PERSONNEL NO").Rows("1:1").RowHeight = 15
    Set T = Sheets("RTC WITH PERSONNEL NO").Range("G1")
    Set BTN25 = Sheets("RTC WITH PERSONNEL NO").BUTTONS.Add(T.Left, T.Top, T.Width, T.Height)
    With BTN25
        .OnAction = "BTN25A": .Caption = "FETCH": .Name = "BTN" & i
    End With
    Set T = Sheets("RTC WITH PERSONNEL NO").Range("F1")
    Set BTN26 = Sheets("RTC WITH PERSONNEL NO").BUTTONS.Add(T.Left, T.Top, T.Width, T.Height)
    With BTN26
        .OnAction = "BTN26A": .Caption = "SORT BY NAME": .Name = "BTN" & i
    End With
    Application.StatusBar = vbNullString
End Sub

Sub BUTTONS5()
    Sheets("RTC DIARY").BUTTONS.Delete
    Application.ScreenUpdating = False
    Sheets("RTC DIARY").Rows("1:1").RowHeight = 15
    Set T = Sheets("RTC DIARY").Range("C1")
    Set BTN27 = Sheets("RTC DIARY").BUTTONS.Add(T.Left, T.Top, T.Width, T.Height)
    With BTN27
        .OnAction = "BTN27A": .Caption = "OUTSTANDING": .Name = "BTN" & i
    End With
    Set T = Sheets("RTC DIARY").Range("D1")
    Set BTN28 = Sheets("RTC DIARY").BUTTONS.Add(T.Left, T.Top, T.Width, T.Height)
    With BTN28
        .OnAction = "BTN28A": .Caption = "ALL": .Name = "BTN" & i
    End With
    Application.StatusBar = vbNullString
End Sub

Sub BUTTONS6()
    Sheets("DRIVER HX").BUTTONS.Delete
    Application.ScreenUpdating = False
    Sheets("DRIVER HX").Rows("4:4").RowHeight = 15
    Set T = Sheets("DRIVER HX").Range("D4")
    Set BTN29 = Sheets("DRIVER HX").BUTTONS.Add(T.Left, T.Top, T.Width, T.Height)
    With BTN29
        .OnAction = "BTN29A": .Caption = "FETCH LA366": .Name = "BTN" & i
    End With
    Application.StatusBar = vbNullString
End Sub

Sub BUTTONS7()
    Sheets("DUPLICATE RTC'S").BUTTONS.Delete
    Application.ScreenUpdating = False
    Sheets("DUPLICATE RTC'S").Rows("1:1").RowHeight = 15
    Set T = Sheets("DUPLICATE RTC'S").Range("D1")
    Set BTN30 = Sheets("DUPLICATE RTC'S").BUTTONS.Add(T.Left, T.Top, T.Width, T.Height)
    With BTN30
        .OnAction = "BTN30A": .Caption = "FETCH": .Name = "BTN" & i
    End With
    Application.StatusBar = vbNullString
End Sub

Sub BUTTONS8()
    Sheets("TBC'S").BUTTONS.Delete
    Application.ScreenUpdating = False
    Sheets("TBC'S").Rows("1:1").RowHeight = 15
    Set T = Sheets("TBC'S").Range("D1")
    Set BTN31 = Sheets("TBC'S").BUTTONS.Add(T.Left, T.Top, T.Width, T.Height)
    With BTN31
        .OnAction = "BTN31A": .Caption = "FETCH": .Name = "BTN" & i
    End With
    Application.StatusBar = vbNullString
End Sub

Sub BUTTONS9()
    Sheets("TBC'S").BUTTONS.Delete
    Application.ScreenUpdating = False
    Sheets("TBC'S").Rows("1:1").RowHeight = 15
    Set T = Sheets("TBC'S").Range("D1")
    Set BTN32 = Sheets("TBC'S").BUTTONS.Add(T.Left, T.Top, T.Width, T.Height)
    With BTN32
        .OnAction = "BTN32A": .Caption = "FETCH": .Name = "BTN" & i
    End With
    Application.StatusBar = vbNullString
End Sub

Sub BUTTONS10()
    Sheets("CREWS").BUTTONS.Delete
    Application.ScreenUpdating = False
    Sheets("CREWS").Rows("1:1").RowHeight = 15
    Set T = Sheets("CREWS").Range("F1")
    Set BTN33 = Sheets("CREWS").BUTTONS.Add(T.Left, T.Top, T.Width, T.Height)
    With BTN33
        .OnAction = "BTN33A": .Caption = "FETCH": .Name = "BTN" & i
    End With
    Application.StatusBar = vbNullString
End Sub

Sub BUTTONS11()
    Sheets("DECELERATION").BUTTONS.Delete
    Application.ScreenUpdating = False
    Sheets("DECELERATION").Rows("1:1").RowHeight = 15
    Set T = Sheets("DECELERATION").Range("M1")
    Set BTN34 = Sheets("DECELERATION").BUTTONS.Add(T.Left, T.Top, T.Width, T.Height)
    With BTN34
        .OnAction = "BTN34A": .Caption = "RESET": .Name = "BTN" & i
    End With
    Application.StatusBar = vbNullString
End Sub

Sub BUTTONS12()
    Sheets("STATISTICALDUMP").BUTTONS.Delete
    Application.ScreenUpdating = False
    Sheets("STATISTICALDUMP").Rows("1:1").RowHeight = 15
    Set T = Sheets("STATISTICALDUMP").Range("C1")
    Set BTN35 = Sheets("STATISTICALDUMP").BUTTONS.Add(T.Left, T.Top, T.Width, T.Height)
    With BTN35
        .OnAction = "BTN35A": .Caption = "CLEAR ALL": .Name = "BTN" & i
    End With

    Set T = Sheets("STATISTICALDUMP").Range("D1")
    Set BTN36 = Sheets("STATISTICALDUMP").BUTTONS.Add(T.Left, T.Top, T.Width, T.Height)
    With BTN36
        .OnAction = "BTN36A": .Caption = "RUN": .Name = "BTN" & i
    End With

    '      Set T = Sheets("STATISTICALDUMP").Range("E1")
    '  Set BTN36 = Sheets("STATISTICALDUMP").BUTTONS.Add(T.Left, T.Top, T.Width, T.Height)
    '  With BTN36
    '      .OnAction = "JUMP": .Caption = "JUMP": .Name = "BTN" & i
    '  End With

    Application.StatusBar = vbNullString
End Sub

Sub BUTTONS13()
    Sheets("IDS Consistency").BUTTONS.Delete
    Application.ScreenUpdating = False
    Sheets("IDS Consistency").Rows("1:1").RowHeight = 15
    Set T = Sheets("IDS Consistency").Range("G1")
    Set BTN37 = Sheets("IDS Consistency").BUTTONS.Add(T.Left, T.Top, T.Width, T.Height)
    With BTN37
        .OnAction = "BTN37A": .Caption = "FETCH": .Name = "BTN" & i
    End With
    Application.StatusBar = vbNullString
End Sub

Sub BUTTONS14()
    Sheets("FLEETLIST").BUTTONS.Delete
    Application.ScreenUpdating = False
    Sheets("FLEETLIST").Rows("2:2").RowHeight = 15
    Set T = Sheets("FLEETLIST").Range("J2")
    Set BTN38 = Sheets("FLEETLIST").BUTTONS.Add(T.Left, T.Top, T.Width, T.Height)
    With BTN38
        .OnAction = "BTN38A": .Caption = "FETCH": .Name = "BTN" & i
    End With
    Application.StatusBar = vbNullString
End Sub

Sub BUTTONS15()
    Sheets("VEHICLE HX").BUTTONS.Delete
    Application.ScreenUpdating = False
    Sheets("VEHICLE HX").Rows("1:1").RowHeight = 15
    Set T = Sheets("VEHICLE HX").Range("B3")
    Set BTN39 = Sheets("VEHICLE HX").BUTTONS.Add(T.Left, T.Top, T.Width, T.Height)
    With BTN39
        .OnAction = "BTN39A": .Caption = "FETCH": .Name = "BTN" & i
    End With
    Set T = Sheets("VEHICLE HX").Range("F1")
    Set BTN40 = Sheets("VEHICLE HX").BUTTONS.Add(T.Left, T.Top, T.Width, T.Height)
    With BTN40
        .OnAction = "BTN40A": .Caption = "SET FLEET": .Name = "BTN" & i
    End With
    Set T = Sheets("VEHICLE HX").Range("G1")
    Set BTN41 = Sheets("VEHICLE HX").BUTTONS.Add(T.Left, T.Top, T.Width, T.Height)
    With BTN41
        .OnAction = "BTN41A": .Caption = "CLEAR FLEET": .Name = "BTN" & i
    End With
    Application.StatusBar = vbNullString
End Sub

Sub BUTTONS16()
    Sheets("VEHICLEDAMAGE").BUTTONS.Delete
    Application.ScreenUpdating = False
    Sheets("VEHICLEDAMAGE").Rows("1:1").RowHeight = 15
    Set T = Sheets("VEHICLEDAMAGE").Range("A3")
    Set BTN42 = Sheets("VEHICLEDAMAGE").BUTTONS.Add(T.Left, T.Top, T.Width, T.Height)
    With BTN42
        .OnAction = "BTN42A": .Caption = "FETCH": .Name = "BTN" & i
    End With
    Set T = Sheets("VEHICLEDAMAGE").Range("F1")
    Set BTN43 = Sheets("VEHICLEDAMAGE").BUTTONS.Add(T.Left, T.Top, T.Width, T.Height)
    With BTN43
        .OnAction = "BTN43A": .Caption = "SET FLEET": .Name = "BTN" & i
    End With
    Set T = Sheets("VEHICLEDAMAGE").Range("G1")
    Set BTN44 = Sheets("VEHICLEDAMAGE").BUTTONS.Add(T.Left, T.Top, T.Width, T.Height)
    With BTN44
        .OnAction = "BTN44A": .Caption = "CLEAR FLEET": .Name = "BTN" & i
    End With
    Application.StatusBar = vbNullString
End Sub

Sub BUTTONS17()
    Sheets("CASE V REPAIR").BUTTONS.Delete
    Application.ScreenUpdating = False
    Sheets("CASE V REPAIR").Rows("1:1").RowHeight = 15
    Set T = Sheets("CASE V REPAIR").Range("E1")
    Set BTN45 = Sheets("CASE V REPAIR").BUTTONS.Add(T.Left, T.Top, T.Width, T.Height)
    With BTN45
        .OnAction = "BTN45A": .Caption = "FETCH": .Name = "BTN" & i
    End With
    Application.StatusBar = vbNullString
End Sub

Sub BUTTONS38()
    Sheets("Incident Report").BUTTONS.Delete
    Application.ScreenUpdating = False
    Sheets("Incident Report").Rows("1:1").RowHeight = 15
    Set T = Sheets("Incident Report").Range("d1")
    Set BTN75 = Sheets("Incident Report").BUTTONS.Add(T.Left, T.Top, T.Width, T.Height)
    With BTN75
        .OnAction = "BTN75A": .Caption = "PDF": .Name = "BTN" & i
    End With
    Application.StatusBar = vbNullString
End Sub

Sub BUTTONS39()
    Application.ScreenUpdating = False
    Sheets("Incident Report").Rows("1:1").RowHeight = 15
    Set T = Sheets("Incident Report").Range("E1")
    Set BTN76 = Sheets("Incident Report").BUTTONS.Add(T.Left, T.Top, T.Width, T.Height)
    With BTN76
        .OnAction = "BTN76A": .Caption = "REDACT": .Name = "BTN" & i
    End With
    Application.StatusBar = vbNullString
End Sub

Sub BUTTONS18()
    Sheets("SERVICING").BUTTONS.Delete
    Application.ScreenUpdating = False
    Sheets("SERVICING").Rows("2:2").RowHeight = 15
    Set T = Sheets("SERVICING").Range("D2")
    Set BTN46 = Sheets("SERVICING").BUTTONS.Add(T.Left, T.Top, T.Width, T.Height)
    With BTN46
        .OnAction = "BTN46A": .Caption = "FETCH": .Name = "BTN" & i
    End With
    Set T = Sheets("SERVICING").Range("F2")
    Set BTN47 = Sheets("SERVICING").BUTTONS.Add(T.Left, T.Top, T.Width, T.Height)
    With BTN47
        .OnAction = "BTN47A": .Caption = "SET FLEET": .Name = "BTN" & i
    End With
    Set T = Sheets("SERVICING").Range("G2")
    Set BTN48 = Sheets("SERVICING").BUTTONS.Add(T.Left, T.Top, T.Width, T.Height)
    With BTN48
        .OnAction = "BTN48A": .Caption = "CLEAR FLEET": .Name = "BTN" & i
    End With
    Application.StatusBar = vbNullString
End Sub

Sub BUTTONS19()
    Sheets("SERVICING2").BUTTONS.Delete
    Application.ScreenUpdating = False
    Sheets("SERVICING2").Rows("2:2").RowHeight = 15
    Set T = Sheets("SERVICING2").Range("D2")
    Set BTN49 = Sheets("SERVICING2").BUTTONS.Add(T.Left, T.Top, T.Width, T.Height)
    With BTN49
        .OnAction = "BTN49A": .Caption = "FETCH": .Name = "BTN" & i
    End With
    Set T = Sheets("SERVICING2").Range("F2")
    Set BTN50 = Sheets("SERVICING2").BUTTONS.Add(T.Left, T.Top, T.Width, T.Height)
    With BTN50
        .OnAction = "BTN50A": .Caption = "SET FLEET": .Name = "BTN" & i
    End With
    Set T = Sheets("SERVICING2").Range("G2")
    Set BTN51 = Sheets("SERVICING2").BUTTONS.Add(T.Left, T.Top, T.Width, T.Height)
    With BTN51
        .OnAction = "BTN51A": .Caption = "CLEAR FLEET": .Name = "BTN" & i
    End With
    Application.StatusBar = vbNullString
End Sub

Sub BUTTONS20()
    Sheets("TEMP_IDS").BUTTONS.Delete
    Application.ScreenUpdating = False
    Sheets("TEMP_IDS").Rows("1:1").RowHeight = 15
    Set T = Sheets("TEMP_IDS").Range("E1")
    Set BTN52 = Sheets("TEMP_IDS").BUTTONS.Add(T.Left, T.Top, T.Width, T.Height)
    With BTN52
        .OnAction = "BTN52A": .Caption = "FETCH": .Name = "BTN" & i
    End With
    Application.StatusBar = vbNullString
End Sub

Sub BUTTONS21()
    Sheets("FLEET STAFF").BUTTONS.Delete
    Application.ScreenUpdating = False
    Sheets("FLEET STAFF").Rows("2:2").RowHeight = 15
    Set T = Sheets("FLEET STAFF").Range("H2")
    Set BTN53 = Sheets("FLEET STAFF").BUTTONS.Add(T.Left, T.Top, T.Width, T.Height)
    With BTN53
        .OnAction = "BTN53A": .Caption = "FETCH": .Name = "BTN" & i
    End With
    Application.StatusBar = vbNullString
End Sub

Sub BUTTONS22()
    Sheets("PHOTOS").BUTTONS.Delete
    Application.ScreenUpdating = False
    Sheets("PHOTOS").Rows("3:3").RowHeight = 15
    Set T = Sheets("PHOTOS").Range("G3")
    Set BTN54 = Sheets("PHOTOS").BUTTONS.Add(T.Left, T.Top, T.Width, T.Height)
    With BTN54
        .OnAction = "BTN54A": .Caption = "FETCH": .Name = "BTN" & i
    End With
    Application.StatusBar = vbNullString
End Sub

Sub BUTTONS23()
    Sheets("BLACK BOX").BUTTONS.Delete
    Application.ScreenUpdating = False
    Sheets("BLACK BOX").Rows("1:1").RowHeight = 15
    Set T = Sheets("BLACK BOX").Range("H1")
    Set BTN55 = Sheets("BLACK BOX").BUTTONS.Add(T.Left, T.Top, T.Width, T.Height)
    With BTN55
        .OnAction = "BTN55A": .Caption = "FETCH": .Name = "BTN" & i
    End With
    Application.StatusBar = vbNullString
End Sub

Sub BUTTONS24()
    Sheets("IDR DOWNLOAD").BUTTONS.Delete
    Application.ScreenUpdating = False
    Sheets("IDR DOWNLOAD").Rows("1:1").RowHeight = 15
    Set T = Sheets("IDR DOWNLOAD").Range("G1:H1")
    Set BTN56 = Sheets("IDR DOWNLOAD").BUTTONS.Add(T.Left, T.Top, T.Width, T.Height)
    With BTN56
        .OnAction = "BTN56A": .Caption = "FETCH": .Name = "BTN" & i
    End With
    Application.StatusBar = vbNullString
End Sub

Sub BUTTONS25()
    Sheets("MOTORCYCLES").BUTTONS.Delete
    Application.ScreenUpdating = False
    Sheets("MOTORCYCLES").Rows("2:2").RowHeight = 15
    Set T = Sheets("MOTORCYCLES").Range("J2")
    Set BTN57 = Sheets("MOTORCYCLES").BUTTONS.Add(T.Left, T.Top, T.Width, T.Height)
    With BTN57
        .OnAction = "BTN57A": .Caption = "FETCH": .Name = "BTN" & i
    End With
    Application.StatusBar = vbNullString
End Sub

Sub BUTTONS26()
    Sheets("DATES").BUTTONS.Delete
    Application.ScreenUpdating = False
    Sheets("DATES").Rows("2:2").RowHeight = 15
    Set T = Sheets("DATES").Range("L2")
    Set BTN58 = Sheets("DATES").BUTTONS.Add(T.Left, T.Top, T.Width, T.Height)
    With BTN58
        .OnAction = "BTN58A": .Caption = "FETCH": .Name = "BTN" & i
    End With
    Application.StatusBar = vbNullString
End Sub

Sub BUTTONS27()
    Sheets("QBE - TURNAMMS").BUTTONS.Delete
    Application.ScreenUpdating = False
    Sheets("QBE - TURNAMMS").Rows("2:2").RowHeight = 15
    Set T = Sheets("QBE - TURNAMMS").Range("H2")
    Set BTN59 = Sheets("QBE - TURNAMMS").BUTTONS.Add(T.Left, T.Top, T.Width, T.Height)
    With BTN59
        .OnAction = "BTN59A": .Caption = "FETCH": .Name = "BTN" & i
    End With
    Application.StatusBar = vbNullString
End Sub

Sub BUTTONS28()
    Sheets("OUTSTANDING RTC REPORTS").BUTTONS.Delete
    Application.ScreenUpdating = False
    Sheets("OUTSTANDING RTC REPORTS").Rows("2:2").RowHeight = 15
    Set T = Sheets("OUTSTANDING RTC REPORTS").Range("j2:k2")
    Set BTN60 = Sheets("OUTSTANDING RTC REPORTS").BUTTONS.Add(T.Left, T.Top, T.Width, T.Height)
    With BTN60
        .OnAction = "BTN60A": .Caption = "FETCH": .Name = "BTN" & i
    End With
    Application.StatusBar = vbNullString
End Sub

Sub BUTTONS29()
    Sheets("REVERSE").BUTTONS.Delete
    Application.ScreenUpdating = False
    Sheets("REVERSE").Rows("2:2").RowHeight = 15
    Set T = Sheets("REVERSE").Range("F2")
    Set BTN61 = Sheets("REVERSE").BUTTONS.Add(T.Left, T.Top, T.Width, T.Height)
    With BTN61
        .OnAction = "BTN61A": .Caption = "FETCH": .Name = "BTN" & i
    End With
    Application.StatusBar = vbNullString
End Sub

Sub BUTTONS30()
    Sheets("WINTER").BUTTONS.Delete
    Application.ScreenUpdating = False
    Sheets("WINTER").Rows("2:2").RowHeight = 15
    Set T = Sheets("WINTER").Range("C2")
    Set BTN62 = Sheets("WINTER").BUTTONS.Add(T.Left, T.Top, T.Width, T.Height)
    With BTN62
        .OnAction = "BTN62A": .Caption = "FETCH": .Name = "BTN" & i
    End With
    Application.StatusBar = vbNullString
End Sub

Sub BUTTONS31()
    Sheets("INCIDENT REPORT").BUTTONS.Delete
    Application.ScreenUpdating = False
    Sheets("INCIDENT REPORT").Rows("1:1").RowHeight = 15
    Set T = Sheets("INCIDENT REPORT").Range("B1:C1")
    Set BTN63 = Sheets("INCIDENT REPORT").BUTTONS.Add(T.Left, T.Top, T.Width, T.Height)
    With BTN63
        .OnAction = "BTN63A": .Caption = "FETCH": .Name = "BTN" & i
    End With
    Application.StatusBar = vbNullString
End Sub

Sub BUTTONS32()
    Sheets("QUICK_CHECK").BUTTONS.Delete
    Application.ScreenUpdating = False
    Sheets("QUICK_CHECK").Rows("1:1").RowHeight = 15
    Set T = Sheets("QUICK_CHECK").Range("C1")
    Set BTN64 = Sheets("QUICK_CHECK").BUTTONS.Add(T.Left, T.Top, T.Width, T.Height)
    With BTN64
        .OnAction = "BTN64A": .Caption = "FETCH": .Name = "BTN" & i
    End With
    Application.StatusBar = vbNullString
End Sub

Sub BUTTONS33()
    Sheets("CI DUTY").BUTTONS.Delete
    Application.ScreenUpdating = False
    Sheets("CI DUTY").Rows("2:2").RowHeight = 15
    Set T = Sheets("CI DUTY").Range("D2")
    Set BTN65 = Sheets("CI DUTY").BUTTONS.Add(T.Left, T.Top, T.Width, T.Height)
    With BTN65
        .OnAction = "BTN65A": .Caption = "FETCH": .Name = "BTN" & i
    End With
    Application.StatusBar = vbNullString
End Sub

Sub BUTTONS34()
    Sheets("DESTRUCTION").BUTTONS.Delete
    Application.ScreenUpdating = False
    Sheets("DESTRUCTION").Rows("1:1").RowHeight = 15
    Set T = Sheets("DESTRUCTION").Range("B1")
    Set BTN66 = Sheets("DESTRUCTION").BUTTONS.Add(T.Left, T.Top, T.Width, T.Height)
    With BTN66
        .OnAction = "BTN66A": .Caption = "FETCH": .Name = "BTN" & i
    End With
    Application.StatusBar = vbNullString
End Sub

Sub BUTTONS35()
    Sheets("rtcfrontpage").BUTTONS.Delete
    Application.ScreenUpdating = False
    ' Sheets("rtcfrontpage").Rows("1:1").RowHeight = 15
    Set T = Sheets("rtcfrontpage").Range("D1")
    Set BTN67 = Sheets("rtcfrontpage").BUTTONS.Add(T.Left, T.Top, T.Width, T.Height)
    With BTN67
        .OnAction = "BTN67A": .Caption = "PRINT": .Name = "BTN" & i
    End With
    Application.StatusBar = vbNullString
End Sub

Sub BUTTONS36()
    Sheets("FOI").BUTTONS.Delete
    Application.ScreenUpdating = False
    Sheets("FOI").Rows("1:1").RowHeight = 15
    Set T = Sheets("FOI").Range("f1")
    Set BTN69 = Sheets("FOI").BUTTONS.Add(T.Left, T.Top, T.Width, T.Height)
    With BTN69
        .OnAction = "BTN69A": .Caption = "FETCH": .Name = "BTN" & i
    End With
    Application.StatusBar = vbNullString
End Sub

Sub BUTTONS37()
    Sheets("reference lookup").BUTTONS.Delete
    Application.ScreenUpdating = False
    'Sheets("reference lookup").Rows("1:1").RowHeight = 15
    Set T = Sheets("reference lookup").Range("N2")
    Set BTN70 = Sheets("reference lookup").BUTTONS.Add(T.Left, T.Top, T.Width, T.Height)
    With BTN70
        .OnAction = "BTN70A": .Caption = "GRS": .Name = "BTN" & i
    End With
    Application.StatusBar = vbNullString
End Sub

Sub EN()
    Application.ScreenUpdating = False
    If Sheets("REFERENCE LOOKUP").CheckBox1 = False Then
        Sheets("REFERENCE LOOKUP").CheckBox1 = True
        Exit Sub
    End If
    If Sheets("REFERENCE LOOKUP").CheckBox1 = True Then
        Sheets("REFERENCE LOOKUP").CheckBox1 = False
    End If
    Application.ScreenUpdating = True
End Sub

Sub EOC2()
    Application.ScreenUpdating = False
    If Sheets("REFERENCE LOOKUP").CheckBox2 = False Then
        Sheets("REFERENCE LOOKUP").CheckBox2 = True
        Exit Sub
    End If
    If Sheets("REFERENCE LOOKUP").CheckBox2 = True Then
        Sheets("REFERENCE LOOKUP").CheckBox2 = False
    End If
    Application.ScreenUpdating = True
End Sub

Sub PS()
    Application.ScreenUpdating = False
    If Sheets("REFERENCE LOOKUP").CheckBox3 = False Then
        Sheets("REFERENCE LOOKUP").CheckBox3 = True
        Exit Sub
    End If
    If Sheets("REFERENCE LOOKUP").CheckBox3 = True Then
        Sheets("REFERENCE LOOKUP").CheckBox3 = False
    End If
    Application.ScreenUpdating = True
End Sub

Sub ColourMe()
    On Error Resume Next
    'Enhanced Name
    ActiveSheet.Shapes("Button 1234").Select
    With Selection.Font
        .Name = "Arial"
        .FontStyle = "Bold"
        .Size = 10
        .Strikethrough = False
        .Superscript = False
        .Subscript = False
        .OutlineFont = False
        .Shadow = False
        .Underline = xlUnderlineStyleNone
        .ColorIndex = 3
        .TintAndShade = 0
        .ThemeFont = xlThemeFontNone
    End With

End Sub
 
Last edited:
I am trying to post some code (about 700 lines) but when I click the Submit Button or Preview, the page freezes and then either the page times out or I get the following message
"The message you have entered is too short. Please lengthen your message to at least 1 characters"

The code is correctly posted between code tags as it should be and I also made sure that I posted some text outside the code tags

Suspecting that the length of the code might be the isssue, I tried reducing the code down to 200 lines for testing but still no luck ... BTW, I did post lengthy code in the past without any issues

However, when I edit the code to displaying just a one liner messagebox, the post is submitted without any problems

I have tried Opera,IE and FireFox browsers with/without all add-Ons and firewall disabled

Could it be that a specific word within the code text is causing the problem (Code has lots of APIs and condtional compilation directives ) ? or is this a known bug ?

Regards

I'm sure you know about the html issue with <
another one is html < title > as its processed by the site
 

Thanks mole999

I am not using formulas ...Still, I tried removing the spaces as recommended in th link between the code tags just in case [ CODE]code goes here with no starting or trailing spaces[/ CODE] but still no joy

This is really wierd ... I have been posting code in this forum for years without any problems. This is the first time I experience such a thing
 
Last edited:
if its not an obvious failure to copy text which can be paste elsewhere, then the first thing is a shut down and restart. Sounds like a clipboard issue otherwise
 
I see that you have already been in the test forum so you may have already done this, but perhaps try there to post progressively smaller sections and you might hone in on a particular part/line of the code that could be causing a problem.
 
@mole999
if its not an obvious failure to copy text which can be paste elsewhere, then the first thing is a shut down and restart. Sounds like a clipboard issue otherwise
Restarted the machine, still no joy

@Peter
I see that you have already been in the test forum so you may have already done this, but perhaps try there to post progressively smaller sections and you might hone in on a particular part/line of the code that could be causing a problem.
Given the length of the code and the number of lines, It is going to be difficult to do that.
This is really strange. I have posted in this forum for years without a problem ... This is the first time I experience a thing like this

Thank you
 
I have finally found out what was causing the problem : HotSpot Shield was activated
Someone installed it on my pc without me knowing :oops:
 

Forum statistics

Threads
1,214,940
Messages
6,122,356
Members
449,080
Latest member
Armadillos

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