+ Reply to Thread
Results 1 to 27 of 27

Print labels for items received on receiving report

Hybrid View

  1. #1
    Forum Expert Mordred's Avatar
    Join Date
    07-06-2010
    Location
    Winnipeg, Canada
    MS-Off Ver
    2007, 2010
    Posts
    2,787

    Re: Print labels for items received on receiving report

    Hi snb, I've tried what you gave twice and both times it crashed excel. Plus, I was unable to exit the form (which was nicely laid out by the way). Mayhap it is because I didn't save and tried to run it from within the zip file.
    If you're happy with someone's help, click that little star at the bottom left of their post to give them Reps.

    ---Keep on Coding in the Free World---

  2. #2
    Forum Expert snb's Avatar
    Join Date
    05-09-2010
    Location
    VBA
    MS-Off Ver
    Redhat
    Posts
    5,649

    Re: Print labels for items received on receiving report

    You have to unzip both files in the same directory first.



  3. #3
    Forum Expert snb's Avatar
    Join Date
    05-09-2010
    Location
    VBA
    MS-Off Ver
    Redhat
    Posts
    5,649

    label tool

    In the attachment a 'revised revision'

    Unzip both files in the same directory: open the Excelfile.
    Attached Files Attached Files

  4. #4
    Valued Forum Contributor
    Join Date
    02-26-2010
    Location
    Chattanooga, TN
    MS-Off Ver
    Excel 2003/2007/2010/2016
    Posts
    432

    Question Re: Print labels for items received on receiving report

    All,

    This code was working, but now it's not.

    If there is an X (or anything) in cells A8:A19, then copy the row (or rows) (I really need to only copy Columns B:H and R:V) to the next available row on the sheet named "Labels".

    Right now, it only copies the first X'ed row and nothing after. Not looping. Anyone see what is wrong?

    Private Sub CommandButton1_Click()
    Dim ce As Range
       For Each ce In Range("A8:A19" & Cells(Rows.Count, 1).End(xlUp).Row)
                 If Not IsEmpty(ce) Then
                          Sheets("Labels").Unprotect "SECRET"
                          Sheets("Labels").Cells(Rows.Count, 1).End(xlUp).Offset(1, 0).Resize(1, 22).Value = Range(ce, ce.Offset(0, 22)).Value
                          ce.ClearContents
                         Sheets("Labels").Select
                       Sheets("Labels").Protect "SECRET"
                 End If
        Next ce
    End Sub
    Lost

+ Reply to Thread

Thread Information

Users Browsing this Thread

There are currently 1 users browsing this thread. (0 members and 1 guests)

Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts

Search Engine Friendly URLs by vBSEO 3.6.0 RC 1