I've previously posted this at
http://www.mrexcel.com/forum/showthread.php?p=2222430&posted=1#post2222430
but no solutions. I'll inform them also.
I have a Userform which is set up to post data to two seperate workbooks. I cannot get it to post the data until I close the Userform. Then, the data is posted correctly. ( But only after the form is closed )Any suggestions on how to have this working correctly, so that I can enter new data without first closing the Userform?.
I've tried setting all the controls to Ctrl.Value=vbnullstring , setting all the textboxes etc.. to " " & me. refresh etc..etc Still I'm stumped.
I’ve found out that this part of the code which assigns the next number in a series to the account number is probably what’s causing problems.
LlastRw = wsSheet.Range("A65536").End(xlUp).Row
NexRw = wsSheet.Range("A65536").End(xlUp).Offset(1, 0).Row
Set StAdd = Range("A65536").End(xlUp)
Set EnAdd = Range("A65536").End(xlUp).Offset(1, 0)
Range("A65536").End(xlUp).Select
If ActiveCell.Row = 2 Then
ActiveCell.Offset(1, 0).Select
MyString = (ActiveSheet.Index & "0001")
firstpart = ("0" & ActiveSheet.Index & "-")
' ActiveCell.Value = firstpart & MyString
fullpart = (firstpart & MyString)
Label2.Caption = (firstpart & MyString)
ClientAccount = ActiveCell.Value
Else
Selection.AutoFill Destination:=Range(StAdd, EnAdd), Type:=xlFillDefault
Range("A65536").End(xlUp).Select
ClientAccount = ActiveCell.Value
Me.Label2.Caption = ClientAccount
End If
It correctly assigns the number, but it somehow causes the form to NOT post the results.
I tried sending it to another Userform, and it shows up correctly, but it still does NOT post it to the worksheet.
Need your help.
Thanks