Filldown? & Cmb?

  • Thread starter Thread starter Guest
  • Start date Start date
G

Guest

Hello,
Thank you for your help:
1.
Why doesn't this fill down code work?
Dim ws As Worksheet
Set ws = Worksheets("Matings Ranch")
'Copy formulas down
ws.Range("C2", Range("B2").End(xlDown)).Offset(0, 1).FillDown

2.
This one requires a bit more info. I have a user form that someone fills
out. It asks 3 questions:
txtDate
cmbSire
cmbMare

I am able to place this info in a worksheet called "Matings Ranch". Each
combo box is filled with a named range example "Marecode" & "Sirecode". These
ranges are on a worksheet called "Lookup" as I enter a sire this is what it
looks like
A B C D
Sire Scode Mare Mcode
Joe Bob 1 Kelly girl 1
Nole 2 Red 2
Tyler 3
Red Dog 4

What i need to happen as the user chooses Joe Bob to mate to Red i need the
number to enter my database and not the name. For example on my database page
"Matings Ranch"
A B C
Date Sire Mare
5/14/06 S1 M2

Any help would be huge. Thank you.
 
Regarding your first question, maybe try fully qualifying the range reference

ws.Range("C2", ws.Range("B2").End(xlDown)).Offset(0, 1).FillDown

The range reference inside the parentheses will refer to the activesheet
otherwise.
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Back
Top