Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations strongm on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

help me... this must must be so simple its evades me.

Status
Not open for further replies.

instanceoftime

Technical User
Mar 16, 2011
7
US
can't believe the problem I am having for a simple task

I want to read cell A1 and copy that value into txtbxName.text
then go to A3 and copy that value into txtbxState.text, I need the "A" to be a variable so I can hit the "next" button and go down my sheet. I know 4 different ways this can be done but each is corrupting my data in the spreadsheet. The task is more than stated above but for simplicity we will work on this.

thanks
 


hi,

Why A1 and then A3?

What happened to A2?

Need to understand WHAT you are doing, rather than HOW you think it ought to happen.

Skip,
[sub]
[glasses]Just traded in my old subtlety...
for a NUANCE![tongue][/sub]
 
I have a spreadsheet with customer data (some columns...oops that would be A1...C1... of data I don't need.)

Private Sub cmdSkip_Click()

Dim vTime As Date

vRow = (vRow + 1)

txtbxDate.Text = Cells(vRow, 1)

vTime = Cells(vRow, 2)
txtbxTime.Text = vTime

txtbxTransactionID.Text = Cells(vRow, 15)
txtbxItem.Text = Cells(vRow, 20)
txtbxID.Text = Cells(vRow, 21)
txtbxGross.Text = Cells(vRow, 9)
txtbxFee.Text = Cells(vRow, 10)
txtbxNet.Text = Cells(vRow, 11)
txtbxTax.Text = Cells(vRow, 24)
txtbxShipping.Text = Cells(vRow, 22)
txtbxEmail.Text = Cells(vRow, 13)
txtbxName.Text = Cells(vRow, 4)
txtbxShippingAddress.Text = Cells(vRow, 38)
txtbxShippingAddress2.Text = Cells(vRow, 39)
txtbxShippingCity.Text = Cells(vRow, 40)
txtbxShippingState.Text = Cells(vRow, 41)
txtbxShippingZip.Text = Cells(vRow, 42)
txtbxShippingCountry.Text = Cells(vRow, 43)
txtbxNotes.Text = Cells(vRow, 12)
 
what i will be doing is pressing a "next" button after a form is filled and printed with customer info and onto the next reading from a spreadsheet and filling my form blanks
 



There you go with the HOW.

I had asked for the WHAT.

You started out referring to A1 & A2, and ignored my questions.

Then you stated that, "A1...C1... of data I don't need."

Please get a focus and answer the questions posed to you.

Skip,
[sub]
[glasses]Just traded in my old subtlety...
for a NUANCE![tongue][/sub]
 
error in my first post.

I want to have the text in cell A1, B1 & E1 copied into txtbxName.text, txtbxCity.text & txtbxState.text

the row destination needs to be a variable so it can be stepped to the next one.
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top