Ask Experts Questions for FREE Help !
Ask
    toveyb's Avatar
    toveyb Posts: 5, Reputation: 1
    New Member
     
    #1

    Jan 18, 2009, 10:03 AM
    Creating A Macro Using an Input Table - Another Attempt
    In my posting yesterday, it was being intreprete that I wanted someone to breach security and that was very much not the case.

    What I was trying to attempt is to hopefully have someone help me duplicate the macro so I can put it in my document because I don't have to access to get to the coding in the original document in which the macro is containe.

    I have the sample file that shows the macro that I need to be duplicated.

    In summary, when the macro is ran that an input talbe will pop up prompting me to enter a numerical value (ie. 1) to the question" "Copies Start At", in the second input table it will ask "Copies End At" (ie. 6)an a numerical value will be entered.

    Based on the criteria entered above, the macro will enter a designated cell an the footer note Tag #1, 2, 3, 4, 5, 6. As a result, I will end up with 6 different pages labeled sequentially, based on one template spreadsheet.

    If anyone can help me, I would appreciate it. If my explanation is not clear, as mentioned above, I do have a sample to provide.

    Thanks!
    JudyKayTee's Avatar
    JudyKayTee Posts: 46,503, Reputation: 4600
    Uber Member
     
    #2

    Jan 18, 2009, 10:07 AM
    Quote Originally Posted by toveyb View Post
    In my posting yesterday, it was being intreprete that I wanted someone to breach security and that was very much not the case.

    What I was trying to attempt is to hopefully have someone help me duplicate the macro so I can put it in my document because I don't have to access to get to the coding in the original document in which the macro is containe.

    I have the sample file that shows the macro that I need to be duplicated.

    In summary, when the macro is ran that an input talbe will pop up prompting me to enter a numerical value (ie. 1) to the question" "Copies Start At", in the second input table it will ask "Copies End At" (ie. 6)an a numerical value will be entered.

    Based on the criteria entered above, the macro will enter in a designated cell an the footer note Tag #1, 2, 3, 4, 5, 6. As a result, I will end up with 6 different pages labeled sequentially, based on one template spreadsheet.

    If anyone can help me, I would appreciate it. If my explanation is not clear, as mentioned above, I do have a sample to provide.

    Thanks!


    I'm a little cofused - I work with macros ALL the time, some of them quite complicated, because I do a lot of legal research, legal reports.

    What is it that you want the macro to do? I don't understand who write the original macro and why you can't ask that person.
    toveyb's Avatar
    toveyb Posts: 5, Reputation: 1
    New Member
     
    #3

    Jan 18, 2009, 10:17 AM
    This document was created by someone that is no longer with our organizatiobn last year when we were doing inventory. And no one else in my are is familiar with macros.

    I need to create something called tag sheets. These tag sheets must have a unique numerical identifier for how ever many I need. For example, if I need 100 tag sheets, I need each tag sheet to be labeled individually from 1 to 100. It needs to be labeled in two places: in a cell at the top and in the footer.

    This macro that was created enables the sheet to be automatically labeled based on the criteria entered into the input tables. As a result, instead of me having to print off 100 sheets and manually number them, the macro will enter the value for me and then print off the sheet.

    I hope this is more clear.
    JudyKayTee's Avatar
    JudyKayTee Posts: 46,503, Reputation: 4600
    Uber Member
     
    #4

    Jan 18, 2009, 11:11 AM
    Quote Originally Posted by toveyb View Post
    This document was created by someone that is no longer with our organizatiobn last year when we were doing inventory. And no one else in my are is familiar with macros.

    I need to create something called tag sheets. These tag sheets must have a unique numerical identifier for how ever many I need. For example, if I need 100 tag sheets, I need each tag sheet to be labeled individually from 1 to 100. It needs to be labeled in two places: in a cell at the top and in the footer.

    This macro that was created enables the sheet to be automatically labeled based on the criteria entered into the input tables. As a result, instead of me having to print off 100 sheets and manually number them, the macro will enter the value for me and then print off the sheet.

    I hope this is more clear.


    I'm not familiar with tag sheets but I am familiar with macros. Are you talking about printing tag sheets (? ) all at one time OR are you talking about printing one now and one then?
    toveyb's Avatar
    toveyb Posts: 5, Reputation: 1
    New Member
     
    #5

    Jan 18, 2009, 01:16 PM
    The tag sheets is the name of the document

    Yes, I am talking about printing the sheets all at one time with each sheet automatically labeled with a number based on the criteria provided in the input table using a macro.

    If you need an example of the macro in which I need duplicated I will provide one, maybe it will be easier if you can see it.
    JBeaucaire's Avatar
    JBeaucaire Posts: 5,426, Reputation: 997
    Software Expert
     
    #6

    Jan 22, 2009, 01:02 AM

    Here are a couple of macros that do what you require. You should be able to adapt them for your needs. Be sure to test with a small # of printouts.

    This example will print ? Copies of the same sheet (It use a Input box to ask you how many) It will copy the page number in cell A1 or in the Header or Footer.

    Note: you can use this for testing .PrintOut preview:=True
    Code:
    Sub PrintCopies_ActiveSheet_1()
        Dim CopiesCount As Long
        Dim CopyNumber As Long
        CopiesCount = Application.InputBox("How many copies do you want", Type:=1)
    
        For CopyNumber = 1 To CopiesCount
            With ActiveSheet
                ' This example print the number in cell A1
                .Range("A1").Value = CopyNumber & " of " & CopiesCount
    
                'If you want the number in the footer use this line
                '.PageSetup.LeftFooter = CopyNumber & " of " & CopiesCount
    
                'Print the sheet
                .PrintOut
            End With
        Next CopyNumber
    End Sub

    The example below continue printing where It left off, such as today you print numbered pages 1-25 and the next time when you enter 10 in the input box it print 26-35.

    Code:
    Sub PrintCopies_ActiveSheet_2()
    ' This example print the number in cell A1
        Dim CopiesCount As Long
        Dim CopyNumber As Long
        CopiesCount = Application.InputBox("How many copies do you want", Type:=1)
    
        With ActiveSheet
            If Not IsNumeric(.Range("A1").Value) Then .Range("A1").Value = 0
    
            For CopyNumber = 1 To CopiesCount
                .Range("A1").Value = .Range("A1").Value + 1
    
                'Print the sheet
                .PrintOut
    
            Next CopyNumber
        End With
    End Sub
    (Code Source)
    toveyb's Avatar
    toveyb Posts: 5, Reputation: 1
    New Member
     
    #7

    Jan 22, 2009, 07:54 AM
    Hi There,

    This is great, I have revised the copy count for cell A1 to meet my needs, but I am unable revise the coding so the same information shows up in the footer.

    Am I not able to have it in both places, or can it only be one or the other. Your assistance is appreciated.

    Code I Was Provided Inititally:

    Sub PrintCopies_ActiveSheet_1()
    Dim CopiesCount As Long
    Dim CopyNumber As Long
    CopiesCount = Application.InputBox("How many copies do you want", Type:=1)

    For CopyNumber = 1 To CopiesCount
    With ActiveSheet
    ' This example print the number in cell A1
    .Range("A1").Value = CopyNumber & " of " & CopiesCount

    'If you want the number in the footer use this line
    '.PageSetup.LeftFooter = CopyNumber & " of " & CopiesCount

    'Print the sheet
    .PrintOut
    End With
    Next CopyNumber
    End Sub

    [U]My Revised Coding, But Footer Not Working[U]

    Sub PrintCopies_ActiveSheet_1()
    Dim CopiesCount As Long
    Dim CopieNumber As Long
    CopiesCount = Application.InputBox("How many copies do you want", Type:=1)

    For CopieNumber = 1 To CopiesCount
    With ActiveSheet
    .Range("A1").Value = " Tag " & CopieNumber

    '.PageSetup.RightFooter = " Tag" & CopieNumber

    'Print the sheet
    .PrintOut
    End With
    Next CopieNumber
    End Sub
    JBeaucaire's Avatar
    JBeaucaire Posts: 5,426, Reputation: 997
    Software Expert
     
    #8

    Jan 22, 2009, 11:42 AM

    That line is commented out in the code, meaning it's turned off. To activate it, remove the ' (apostrophe) from the beginning of the line for the footer.

    You'll know it's active when that line changes color back to match the rest of the active code. Comment lines usually appear in an off-color.

Not your question? Ask your question View similar questions

 

Question Tools Search this Question
Search this Question:

Advanced Search

Add your answer here.


Check out some similar questions!

Creating a Macro Using An Input Table [ 2 Answers ]

I have a sample document that I could provide someone that will show the macro that I need to use in a new document I have created. It currently has a password on it and I would like to duplicate it, but unable to get access to the coding due to the password restriction. If you are interested...

Attempt of court [ 7 Answers ]

My X Husband is saying that he is going to file a attempt of court on me. I am wanting to know what is this ? How does this work and what will happen to me I mean will I have to go to jail??

Another attempt to get an opinion [ 9 Answers ]

I am having issues. My ex boyfriend / friend in a different state searched for me for 3 years and found me 3 weeks ago. We haven't seen each other in a decade, but he felt strongly like he had to find me. At first I didn't know what to think because I have been married for four years. I feel such a...


View more questions Search