+ Reply to Thread
Results 1 to 2 of 2

Printing on message box condition?

  1. #1
    Forum Expert Simon Lloyd's Avatar
    Join Date
    03-02-2004
    Location
    locked in the cage
    MS-Off Ver
    All the ones my homepage shows
    Posts
    3,161

    Printing on message box condition?

    Does anyone know how to print when a certain condition is present in a message box e.g if my msgbox has text and value like....Bloggs J has 17 days booked off, is it possible to have some code that then finds all instances of that name in any column greater than row13 and also select the corresponding offset from column A paste them in to a workbook then print them off as 2 columns (if it can be done with out pasting in to a workbook even better!) so effectively it would look like this:-

    So Column A would be the date and the offset may be x amount of columns away that contains the name Bloggs J

    12/2/05 Bloggs J
    22/3/05 Bloggs J
    4/7/05 Bloggs J

    etc.?

    Hope you can help,

    Simon

  2. #2
    XPete
    Guest

    Re: Printing on message box condition?

    Simon, the msgbox is set up with strings and integers already. It would
    be a lot easier to test on these, rather than on a msgbox value.

    I can imagine that your msgbox is set up something like:

    msgbox PersonName & "has " & No_Days & " days booked off"

    where PersonName is string that contains Bloggs J and No_Days is the
    integer that has the number of days booked off.

    Write a do...loop that searches picks up all the values in your sheet
    matching the PersonName and paste them into your new sheet/book.

    Good luck
    Peter


+ 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