hey vijay actually i have one userform in workingfile.xls with 5 textbox and 1 command button
now i want when if click on command button the value of all textbox will be the value of datafile.xls sheet1 columnA,b,c,d,e every time.
let me know is it sufficient data for u?
actually i have already the vba module for copy the data on workingfile.xls from all textbox but i want to copy the data on datafile.xls
Present code:
Private Sub Commandbutton1_Click()
Dim RowCount As Long
Dim ctl As Control
' Write data to worksheet
Sheet1.Activate
With Sheets("Sheet1").Columns(4).Rows(65536).End(xlUp)
.Offset(1, 0).Value = Me.textbox1.Value
.Offset(1, 1).Value = Me.textbox2.Value
.Offset(1, 2).Value = Me.textbox3.Value
.Offset(1, 3).Value = Me.textbox4.Value
.Offset(1, 4).Value = Me.textbox5.Value
End With
Me.textbox1.Value = ""
Me.textbox2.Value = ""
Me.textbox3.Value = ""
Me.textbox4.Value = ""
Me.textbox5.Value = ""
Me.textbox1.SetFocus
End Sub