+ Reply to Thread
Results 1 to 2 of 2

Problem getting info to transfer

  1. #1
    Rob Hargreaves
    Guest

    Problem getting info to transfer

    Hi I have a worksheet as a form.

    This is how the form is laid out.

    Date

    Input A - Always column E
    Input B - Always Column F
    Input C - Always Column G
    and so on..

    The date input always decides the row to input the data
    to. The date is always in Column B on my data sheet.

    Set Rng = Range("E" & Application.Match(Range("D6"), Range
    ("B:B"), 0))
    Rng.Value = Application.Worksheets("Daily").Range
    ("D8").Text

    So in the above I have "E" because this is relating to
    Input A and will go in column E.

    I have "D6" because thats where the date on the form is
    held on the worksheet. B:B because the date is always in
    column B and D8 where I want to output Input A into.

    I am having great difficulty in getting this to work.
    Even for one input textbox. And I have about 12!!

    I am trying to get it to work from a button on the form
    sheet so when I click on the button the information will
    transfer to the sheet "Daily" to whatever column I
    specify whether information is already in that cell or
    not.

    Can you help??

    I know I probably need a

    Dim Rng As Range

    at the top of the procedure but I am lost.

    Thanks

    Rob

  2. #2
    Tom Ogilvy
    Guest

    Re: Problem getting info to transfer

    I should have put clng around Range("D6"). so it would be clng(Range("D6")
    if that doesn't clear it up, then perhaps some of the ranges are on
    different sheets.
    I don't know where your data is, but as I said, you might need to qualify
    the ranges. Lets assume all the ranges are on Daily, but daily won't be
    the activesheet. Then

    set sh = Worksheets("Daily")

    Set Rng = sh.Range("E" & Application.Match( _
    clng(sh.Range("D6")), sh.Range("B:B"), 0))
    Rng.Value = sh.Range("D8").Text

    But perhaps that is not the case. If column B with the dates were on a sheet
    call DATA and the other ranges on Daily then

    set sh = Worksheets("Daily")
    set shData = Worksheets("Data")

    Set Rng = sh.Range("E" & Application.Match( _
    clng(sh.Range("D6")), shData.Range("B:B"), 0))
    Rng.Value = sh.Range("D8").Text

    So you would make similar type adjustments to match your actual situation.

    --
    Regards,
    Tom Ogilvy


    "Rob Hargreaves" <anonymous@discussions.microsoft.com> wrote in message
    news:2de601c507ba$25299200$a601280a@phx.gbl...
    > Hi I have a worksheet as a form.
    >
    > This is how the form is laid out.
    >
    > Date
    >
    > Input A - Always column E
    > Input B - Always Column F
    > Input C - Always Column G
    > and so on..
    >
    > The date input always decides the row to input the data
    > to. The date is always in Column B on my data sheet.
    >
    > Set Rng = Range("E" & Application.Match(Range("D6"), Range
    > ("B:B"), 0))
    > Rng.Value = Application.Worksheets("Daily").Range
    > ("D8").Text
    >
    > So in the above I have "E" because this is relating to
    > Input A and will go in column E.
    >
    > I have "D6" because thats where the date on the form is
    > held on the worksheet. B:B because the date is always in
    > column B and D8 where I want to output Input A into.
    >
    > I am having great difficulty in getting this to work.
    > Even for one input textbox. And I have about 12!!
    >
    > I am trying to get it to work from a button on the form
    > sheet so when I click on the button the information will
    > transfer to the sheet "Daily" to whatever column I
    > specify whether information is already in that cell or
    > not.
    >
    > Can you help??
    >
    > I know I probably need a
    >
    > Dim Rng As Range
    >
    > at the top of the procedure but I am lost.
    >
    > Thanks
    >
    > Rob




+ 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