I have a custom/dynamically generated form with X numbers of textboxes where X is number if elements from WorkSheet1. It also
generates an Update button and a Cancel button.
The form is generating fine. For instance if the number of cells
with value in WorkSheet1 is 10, then the form generates 10 textboxes and it puts cell value as the value of the textboxes.
Dim MilestoneSheet As Worksheet
Set MilestoneSheet = Worksheets("MIilestoneDates")
Set MilestoneDate = milestoneSheet.Range("A1")
While (MilestoneDate.Value <> "")
Dim textbox As Control
Set textbox = MilestoneForm.Controls.Add("Forms.TextBox.1")
Dim MilestoneDate As Date
'Set textbox properties
With textbox.Height = 20
.Left = 2
.Top = 6
.Width = 90
'Set the name and value of the Textbox
.Name = "TextBox" & MilestoneDate.Row
.Value = MilestoneDateEnd With
Set MilestoneDate = MilestoneDate.EntireColumn.Rows(MilestoneDate.Row + 1)Wend
It starts with A1 of WorkSheet1 and goes down one cell a time and adds that cell value to the textbox value till it reaches
an empty cell.
What I need to do now is on the form the value of any textbox can be changed by the user and once
when they click the Update button it should then change only those cells in WorkSheet1 that had its textbox value changed by
For instances if there are 10 cell with values and the form generated 10 textboxes, it should then
change the value of cell 3 and 7 when the value in textbox 3 and 7 are changed by the user in the form.
Can I get
some in solving this issue. Thanks in advance.