Sub MinFun()
For n = 1 To UBound(MyResFT)
If MinVal = MyResFT(n) Then
n = n
End If
Next
I want to assign value to n basis match between MinVal & MyResFT(n). Getting this error. Please help.
Sub MinFun()
For n = 1 To UBound(MyResFT)
If MinVal = MyResFT(n) Then
n = n
End If
Next
I want to assign value to n basis match between MinVal & MyResFT(n). Getting this error. Please help.
how do you populate MyResFT ?
is it maybe a 2 dimensional array?
eg
Im not sure what you are doing here though you seem to be changing n and trying to use it in a for loop how is that going to work (and you are assigning it to be itself)? don't you want to assign a different thing to be n? like maybe nn?![]()
For n = 1 To UBound(MyResFT) If MinVal = MyResFT(n,1) Then n = n End If Next
Last edited by scottiex; 06-29-2017 at 12:52 AM.
If you want something done right... find a forum and ask an online expert.
Time flies like an arrow. Fruit flies like a banana.
The Array's one dimensional.
Declared as MyResFT()
ReDim MyResFT(10)
OK I imagine we need the rest of the code then, as filling out that code doesn't seem to create an error.
When I debug it, here's where the error's reflected.
MyResFT(n) = Sheets("Sheet3").Cells(myrow, 6)
kwadh, welcome to the forum.
Please take a minut to read our forum rules.
Your post does not comply with Rule 3 of our Forum RULES. Use code tags around code.
Posting code between [CODE] [/CODE] tags makes your code much easier to read and copy for testing, it also maintains VBA formatting.
Click on Edit to open your thread, then highlight your code and click the # icon at the top of your post window. More information about these and other tags can be found here
Also how do you fill MyRestFT ?
Where do you determine myrow ?
I guess we will need the entire code your using because now there are more questions then answers.
Avoid using Select, Selection and Activate in your code. Use With ... End With instead.
You can show your appreciation for those that have helped you by clicking the * at the bottom left of any of their posts.
There are currently 1 users browsing this thread. (0 members and 1 guests)
Bookmarks