I need to write a VBA code which will search data in 'Bold' from a list. It should be in dynamic array since the data will be updated constantly. I met many problem with this....attached is the data i need to work on...thanx a lot
Sub DynamicArray()
Dim Device() As String ' declares a dynamic array variable
Dim iCount As Integer
Dim Max As Integer
Worksheets("Proto & Other Experiment").Activate
ActiveSheet.Range("B2").EntireColumn.Select
' Device = Selection.FindText(True, LookIn:=xlsPattern)
Max = Worksheets("Proto & Other Experiment").Device.Count ' finds the maximum array size
ReDim Device(1 To Max) ' declares the array variable with the necessary size
For iCount = 1 To Max
Device(iCount) = Worksheets("Proto & Other Experiment").Device(iCount)
Next iCount
Erase Device() ' deletes the varible contents, free some memory
End Sub


Sign In
Create Account


Back to top









