Home |
Search |
Today's Posts |
|
#1
![]()
Posted to microsoft.public.excel.programming
|
|||
|
|||
![]() Hello, I have a VBA form that a user completes to add data. When the form is closed, I can transfer the data into the current worksheet by this.... Code: -------------------- Range("h" & TankLine).Value = txtDate.Text Range("i" & TankLine).Value = txtTime.Text Range("g" & TankLine).Value = txtInits.Text -------------------- but I can't get it to put data into a different worksheet in the same workbook. I have tried Code: -------------------- Sheet1.Range("h" & TankLine).Value = txtDate.Text -------------------- and Code: -------------------- Sheet1!Range("h" & TankLine).Value = txtDate.Text -------------------- but neither works. How do I do this, please? Thanks, Richard -- rickalty ------------------------------------------------------------------------ rickalty's Profile: http://www.excelforum.com/member.php...o&userid=34180 View this thread: http://www.excelforum.com/showthread...hreadid=539426 |
#2
![]()
Posted to microsoft.public.excel.programming
|
|||
|
|||
![]()
Try
Worksheets("Sheet2").Range("h"&TankLine).Value = txtDate.Text -- Cordially, Chip Pearson Microsoft MVP - Excel Pearson Software Consulting, LLC www.cpearson.com "rickalty" wrote in message ... Hello, I have a VBA form that a user completes to add data. When the form is closed, I can transfer the data into the current worksheet by this.... Code: -------------------- Range("h" & TankLine).Value = txtDate.Text Range("i" & TankLine).Value = txtTime.Text Range("g" & TankLine).Value = txtInits.Text -------------------- but I can't get it to put data into a different worksheet in the same workbook. I have tried Code: -------------------- Sheet1.Range("h" & TankLine).Value = txtDate.Text -------------------- and Code: -------------------- Sheet1!Range("h" & TankLine).Value = txtDate.Text -------------------- but neither works. How do I do this, please? Thanks, Richard -- rickalty ------------------------------------------------------------------------ rickalty's Profile: http://www.excelforum.com/member.php...o&userid=34180 View this thread: http://www.excelforum.com/showthread...hreadid=539426 |
#3
![]()
Posted to microsoft.public.excel.programming
|
|||
|
|||
![]() Thank you! That worked perfectly. Richard -- rickalty ------------------------------------------------------------------------ rickalty's Profile: http://www.excelforum.com/member.php...o&userid=34180 View this thread: http://www.excelforum.com/showthread...hreadid=539426 |
Reply |
Thread Tools | Search this Thread |
Display Modes | |
|
|
![]() |
||||
Thread | Forum | |||
inserting a worksheet | Excel Discussion (Misc queries) | |||
Inserting data from one worksheet to another | Excel Worksheet Functions | |||
Inserting New Worksheet | Excel Discussion (Misc queries) | |||
Inserting row in 1 worksheet and updating a different row in another worksheet | Excel Discussion (Misc queries) | |||
Macro's - inserting a worksheet and having upload data | Excel Programming |