Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • Home
  • SEARCH
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 8441991
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 10, 20262026-06-10T08:43:26+00:00 2026-06-10T08:43:26+00:00

Okay, so I’m trying to create an order log for a business (employee usage).

  • 0

Okay, so I’m trying to create an order log for a business (employee usage).

I have a form set out where multiple users can access/input all the information needed. It prints into an Excel spreadsheet for one person to open and place orders from. Sometimes a user might want to copy an order line from a previous year’s log (there are 4 so far), so I’m trying to incorporate that into the current log.

I’m having trouble with referencing another workbook that the user has opened and copying the information into a userform opened in the current log. I have this:

Private Sub cmdCopy_Click()

Dim rowRef As Integer, colItem As Integer, colSup As Integer, colCatNum As Integer, colQty As Integer, colUnit As Integer, colCat As Integer

'stores row of selected order from old order log successfully
rowRef = ActiveCell.row

'I'm trying to find which column has which headers as the logs aren't consistent
For x = 2 To 9
    If ActiveWorkbook.Sheet1.Cells(2, x).Text = "Item" Then
        colItem = x
    ElseIf ActiveWorkbook.Sheet1.Cells(2, x).Text = "Supplier" Then
        colSup = x
    ElseIf ActiveWorkbook.Sheet1.Cells(2, x).Text = "Catalogue #" Then
        colCatNum = x
    ElseIf ActiveWorkbook.Sheet1.Cells(2, x).Text = "Qty" Then
        colQty = x
    ElseIf ActiveWorkbook.Sheet1.Cells(2, x).Text = "Unit" Then
        colUnit = x
    ElseIf ActiveWorkbook.Sheet1.Cells(2, x).Text = "Category" Then
        colCat = x
    End If
Next x

'fills information into userform
txtItem.Text = Sheet1.Cells(rowRef, colItem).Text
txtSup.Text = Sheet1.Cells(rowRef, colSup).Value
txtCatNum.Text = Sheet1.Cells(rowRef, colCatNum).Value
txtQty.Text = Sheet1.Cells(rowRef, colQty).Value
cboUnit.Text = Sheet1.Cells(rowRef, colUnit).Value
cboCat.Text = Sheet1.Cells(rowRef, colCat).Value

End Sub

So what I want to happen is:

  1. User opens current order log
  2. User presses ActiveX button to open frmOrderLog
  3. a) User enters information manually
    b) User copies information from current year’s log
    c) User minimizes window, opens previous year’s log, selects a cell, and in the userform presses “Copy Order” button which then copies the information from corresponding cells from the previous year’s order log into the corresponding text boxes/combo boxes in the form within the current year’s order log

If there is any requirement for clarification, let me know. I’m sorry if this is in the forums already, but using my search terms I could not find answers that helped.

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-06-10T08:43:28+00:00Added an answer on June 10, 2026 at 8:43 am

    Seems like a simple syntax issue to me:

    you want to change:

    If ActiveWorkbook.Sheet1.Cells(2, x).Text = "Item" Then
    

    To:

    If ActiveWorkbook.Sheets(1).Cells(2, x).Text = "Item" Then
    

    The Sheet1 syntax didn’t work for me.

    And obviously you want to make the same change wherever else Sheet1 occurs.

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

Okay, next PHPExcel question. I have an HTML form that users fill out and
Okay, I have the following create action #posts_controller, nested resource under discussions def create
Okay so here is my database: I have a page on my .net form
Okay so I have a form that is using PHP to mail to an
okay, i have a form dropdown <select name=select_category id=select_category> <option value=cheese-cakes>Cheesecakes</option> <option value=fruit-cakes>Fruitcakes</option> </select>
Okay so I have to create a radix sort for both unsigned ints and
Okay this question is very simple: I have a facebook page, and a website.
Okay, so I have my post.php page. If you are not logged in, you'll
Okay - I have a dilemma. So far my script converts page titles into
okay, i'm setting up a multi-user chat system. i have a messages table, that

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.