Hi,
I have got very difficult issue for me and cannot handle it myself
Hope experts here can help me.
First of all I need to say that I am not good in VB, I am doing sth only from time to time only using hints and manuals.
Now I did sth which is very helpful for me, a user form which retrieves data from a worksheet (numbers, usually %), shows them in textboxes in UserForm, where I can change the numbers, correct them, click another button and save/overwrite the worksheet with new/updated number (usually % "0.00%").
So I have done one macro for retrieving data from the worksheet to UserForm:
UserForm1.FirstTextBOX = Format(Sheets("database").Range("Data_Start").Offset(TargetRaw, 63).Value, "Percent")
data appear in the UserForm in a proper % format
I update it and click save initiating another macro working other way around:
Sheets("database").Range("Data_Start").Offset(TargetRaw, 63).Value = UserForm1.FirstTextBOX
It updates the database in the cell I want and the value I entered but it in a TEXT format.
I need it to be updated in Number format because it destroys all formulas I have, does not calculate anything with text
I have tried to export data back to the database with
Format (Sheets("database").Range("Data_Start").Offset(TargetRaw, 63).Value, "Percent") = UserForm1.FirstTextBOX
but it does not work at all.
What can I do to solve it? should I somehow change the textbox properties?
How I should write the export macro to have a number format in worksheet?
Can somebody help me?
really appreciated.
E.
I have got very difficult issue for me and cannot handle it myself
Hope experts here can help me.
First of all I need to say that I am not good in VB, I am doing sth only from time to time only using hints and manuals.
Now I did sth which is very helpful for me, a user form which retrieves data from a worksheet (numbers, usually %), shows them in textboxes in UserForm, where I can change the numbers, correct them, click another button and save/overwrite the worksheet with new/updated number (usually % "0.00%").
So I have done one macro for retrieving data from the worksheet to UserForm:
UserForm1.FirstTextBOX = Format(Sheets("database").Range("Data_Start").Offset(TargetRaw, 63).Value, "Percent")
data appear in the UserForm in a proper % format
I update it and click save initiating another macro working other way around:
Sheets("database").Range("Data_Start").Offset(TargetRaw, 63).Value = UserForm1.FirstTextBOX
It updates the database in the cell I want and the value I entered but it in a TEXT format.
I need it to be updated in Number format because it destroys all formulas I have, does not calculate anything with text
I have tried to export data back to the database with
Format (Sheets("database").Range("Data_Start").Offset(TargetRaw, 63).Value, "Percent") = UserForm1.FirstTextBOX
but it does not work at all.
What can I do to solve it? should I somehow change the textbox properties?
How I should write the export macro to have a number format in worksheet?
Can somebody help me?
really appreciated.
E.