[Last Call] Learn how to a build a cloud-first strategyRegister Now

x
?
Solved

Macro does not appear

Posted on 2014-07-14
4
Medium Priority
?
177 Views
Last Modified: 2014-07-14
Folks,
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)
    sn = Split("JAN,FEB,MAR,APR,MAY,JUN,JUL,AUG,SEP,OCT,NOV,DEC", ",")
    
    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
Project-Cost-Allocation.xlsm
0
Comment
Question by:Frank Freese
  • 2
  • 2
4 Comments
 
LVL 21

Accepted Solution

by:
Randy Poole earned 2000 total points
ID: 40195470
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
0
 

Author Comment

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

Author Closing Comment

by:Frank Freese
ID: 40195483
great jub
0
 
LVL 21

Expert Comment

by:Randy Poole
ID: 40195486
lol, NP
0

Featured Post

VIDEO: THE CONCERTO CLOUD FOR HEALTHCARE

Modern healthcare requires a modern cloud. View this brief video to understand how the Concerto Cloud for Healthcare can help your organization.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

This code takes an Excel list of URL’s and adds a header titled “URL List”. It then searches through all URL’s in column “A”, looking for duplicates. When a duplicate is found, it is moved to the top of the list. The duplicate URL’s are then highlig…
You need to know the location of the Office templates folder, so that when you create new templates, they are saved to that location, and thus are available for selection when creating new documents.  The steps to find the Templates folder path are …
The viewer will learn how to create two correlated normally distributed random variables in Excel, use a normal distribution to simulate the return on different levels of investment in each of the two funds over a period of ten years, and, create a …
Graphs within dashboards are meant to be dynamic, representing data from a period of time that will change each time the dashboard is updated with new data. Rather than update each graph to point to a different set within a static set of data, t…

830 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