-
Hi Suresh,
Regarding part 1, here's one suggestion.
Add Tag values to each control equal to the spreadsheet offset. You can then loop through the controls using the tag values to write the results to the appropriate columns.
Something like
[vba]
Sub FillData()
Dim c, i As Long
i = Worksheets("Servers").Columns("B:B").Find(What:=ServerName, _
After:=[B1], LookIn:=xlValues, _
LookAt:=xlWhole).Row
For Each c In Controls
If Not c.Tag = "" Then
Worksheets("Servers").Range("B1").Offset(i - 1, c.Tag) = c.text
End If
Next
End Sub
[/vba]
MVP (Excel 2008-2010)
Post a workbook with sample data and layout if you want a quicker solution.
To help indent your macros try Smart Indent
Please remember to mark threads 'Solved'
Posting Permissions
- You may not post new threads
- You may not post replies
- You may not post attachments
- You may not edit your posts
-
Forum Rules