Macro does not appear

Posted on 2014-07-14
Last Modified: 2014-07-14
In the attached workbook I have a macro labeled "ChangeTabNames"
Sub ChangeTabNames(Append As String)
    Dim xls As Excel.Worksheet
    Dim sn() As String
    Dim csn As String
    Dim l As Integer
    Append = Trim(Append)
    For Each xls In ActiveWorkbook.Sheets
        For l = LBound(sn) To UBound(sn)
            If UCase(xls.Name) = sn(l) Then
                xls.Name = xls.Name & " " & Append
                Exit For
            End If
        Next l
    Next xls
End Sub

Open in new window

I have a form control where I would like to assign this macros to the form control.
The problem I'm having is that this macro does not appear on my macro list
Question by:Frank Freese
    LVL 21

    Accepted Solution

    That is because Only macro subs with no parameters will appear in your list, hard code the append as I did in the previous question

    Author Comment

    by:Frank Freese
    that was real dumb of you Frank. Thanks Randy, I knew better

    Author Closing Comment

    by:Frank Freese
    great jub
    LVL 21

    Expert Comment

    by:Randy Poole
    lol, NP

    Write Comment

    Please enter a first name

    Please enter a last name

    We will never share this with anyone.

    Featured Post

    How to improve team productivity

    Quip adds documents, spreadsheets, and tasklists to your Slack experience
    - Elevate ideas to Quip docs
    - Share Quip docs in Slack
    - Get notified of changes to your docs
    - Available on iOS/Android/Desktop/Web
    - Online/Offline

    Suggested Solutions

    Title # Comments Views Activity
    excel formula or VBA 7 35
    IF OR formula Excel 8 23
    recovering Excel 2016 file 2 24
    VBA Help TT V-1.1 15 22
    INDEX and MATCH can be used to great effect to replace HLOOKUP and VLOOKUP as it does not have the limitation of needing the data to be sorted so that the reference value is in the first column or row. It also has the ability to perform a bi-directi…
    Approximate matching with VLOOKUP and MATCH seems to me to be a greatly under-used technique, and one which is vital for getting good performance out of large lookups. Until recently I would always have advised using an exact match for simplicity an…
    Viewers will learn the basics of slicers and timelines for both PivotTables and standard Excel tables in Excel 2013.
    This Micro Tutorial will demonstrate on a Mac how to change the sort order for chart legend values and decrpyt the intimidating chart menu.

    761 members asked questions and received personalized solutions in the past 7 days.

    Join the community of 500,000 technology professionals and ask your questions.

    Join & Ask a Question

    Need Help in Real-Time?

    Connect with top rated Experts

    8 Experts available now in Live!

    Get 1:1 Help Now