Hi All,
I'm using following user form to update cells in activeworkbook. I need to update this macro to do transfer of this inputs to another workbook so I can have archive file.
This archive file is on following path S:\PONUDE\Archive.xls
Can someone update my macro to store user form inputs into archive.xls in the first empty row.
Thanks in advance
M
Private Sub cmdOK_Click() ActiveWorkbook.Sheets("Calculator").Activate Range("C38").Select ActiveCell.Value = cboDepartment.Value ActiveCell.Offset(1, 0) = txtPhone.Value ActiveCell.Offset(3, 0) = cboCourse.Value ActiveCell.Offset(0, 3) = cboCourse.Value Range("G38") = txtName.Value Range("G39") = TextBox1.Value Range("G40") = TextBox2.Value Range("G41") = TextBox3.Value Range("G42") = ComboBox3.Value Range("G43") = TextBox5.Value Range("G44") = TextBox6.Value Range("C42") = ComboBox1.Value Range("C43") = ComboBox2.Value
In both workbooks?
Your present code seem,s ro write to the same cells
Last edited by royUK; 11-19-2010 at 06:13 AM.
Hope that helps.
RoyUK
--------
If you are pleased with a member's answer then use the Star icon to rate it, if you are pleased enough to part with cash consider a donation to Children in Need
For Excel Tips & Solutions, free examples and tutorials why not check out my downloads
New members please read & follow the Forum Rules
Remember to mark your questions Solved and rate the answer(s)
Private Sub cmdOK_Click() With ActiveWorkbook.Sheets("Calculator").Range("C38") .Value = cboDepartment.Value .Offset(1, 0) = txtPhone.Value .Offset(3, 0) = cboCourse.Value .Offset(0, 3) = cboCourse.Value .offset(,4).resize(9)=application.transpose(array(txtName.Value,TextBox1.Value,TextBox2.Value,TextBox3.Value,ComboBox3.Value,TextBox5.Value,TextBox6.Value,ComboBox1.Value, ComboBox2.Value)) sn=range("C38:G47") End With With Getobject("S:\PONUDE\Archive.xls") .sheets(1).cells(rows.count,1).end(xlup).offset(1).resize(ubound(sn),ubound(sn2))=sn .close True end with End Sub
There are currently 1 users browsing this thread. (0 members and 1 guests)
Bookmarks