+ Reply to Thread
Results 1 to 2 of 2

Storing a Value

  1. #1
    Forum Contributor
    Join Date
    01-18-2005
    Posts
    238

    Storing a Value

    Could someone please help with my code. I have a command button in a user form that I am trying to extract the value from a combo box in order to print a certain sheet.

    Private Sub cmd_pullsheet()
    If cbo_pullsheet = FIESTA Then

    Workbooks.Open Filename:="M:\doc\PRODUCTION\ITEMS\FIESTA.xls"
    Range("B6").Select
    Activecell.value = txt_pullsheettubs
    ActiveWindow.SelectedSheets.Printout Copies:=1, Collate:=True
    ActiveWorkbook.Save
    ActiveWindow.Close

    End if

    End Sub


    cbo_pullsheet is a combo box with a list of items

    FIESTA
    ISLAND CRUNCH
    ORIGINAL
    .......

    Is there anyway that I can have the code take what value is in the combo box(cbo_pullsheet) and then print that sheet that matches.

    For instance if cbo_pullsheet = ISLAND CRUNCH then it would print the sheet from the same path, except for the last file would be ISLAND CRUNCH instead of FIESTA.

    Any help would be greatly appreciated.

    Thanks in Advance

    Josh

  2. #2
    Forum Contributor
    Join Date
    11-16-2004
    Posts
    282

    Using value selected from combo box...

    Josh

    Try this code instead:
    Please Login or Register  to view this content.
    Hope this helps,
    theDude

+ 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