You can use the CallByName function to refer to objects using their name as text.
___
For x = 52 To 57
With CallByName(Me, "Label" & x, VbGet)
CallByName(Me, "Label" & (x + 1), VbGet).Left = .Left + .Width
End With
Next x
___
However, recommended method is to use control arrays...
Instead of using Index for this purpose, I would suggest using the Tag property which is more suitable for storing some auxiliary data. The Tag property is not visible in Menu Editor window. You must use the Properties window to initialize Tag property after defining the menu structure.
If you...
>other requirements
I revisited the question. OK, the code needs to be simplified as follows.
___
Dim r As Integer
MSHFlexGrid1.Col = 3
For r = 1 To MSHFlexGrid1.Rows - 1
MSHFlexGrid1.Row = r
If MSHFlexGrid1.Text = cboSearch.Text Then
MSHFlexGrid1.CellBackColor = vbGreen...
First of all, try to indent your code. It makes things a lot easier to read and understand.
I hope you have enabled auto indentation which is turned on by default. If not, you are strongly advised to do so. (Tools>Options>Auto Indent).
When you indent the above code, it looks like the following...
You don't need to pull data from your recordset. Instead, you can use the FlexGrid control to query the data (image path) directly.
Something like this...
Image1.Picture = LoadPicture(MSHFlexGrid1.TextMatrix(MSHFlexGrid1.Row, N))
Where N is the column number where 'id_photo' field is displayed...
Put the following formula in cell B1.
=MID(A1,FIND(" ",A1)+1,100)
This will extract the email address from cell A1 to cell B1 leaving behind the serial number.
You can copy the formula to following cells in the column. VBA is not needed for such a trivial task.
For further questions related to...
Considering the fact that month names are in Italian, the code will be able to recognize them correctly, if regional settings are set to Italian, which I assume you have.
Try the following function.
___
Private Function LastDay(MyVar As String) As Date
Dim V() As String
V =...
If you get the dominant frequency in step 2, why do you proceed further? I assume you do so because the frequency returned by FFT is not accurate enough. Is that right?
I did not mean to implement a full-fledged DSP filter. I just wanted you to add a hysteresis window to your zero-crossing...
Two things.
1. You said you already tried the zero-crossing technique. What problems did you face with that method? If the results are not accurate enough (like getting a frequency higher than actual in result), you should implement the hysteresis filter. It would eliminate noise and low...
This will very much depend upon the shape and specification of your input signal. If your signal is monotone, and has fixed amplitude, then it will be very easy to detect. However, if your signal is more complex, for instance, contains multiple frequencies of varying amplitude over time, than...
>I can only assume that for some reason VB thinks that the smaller EXE is in fact the same as the main EXE as far as PrevInstance is concerned.
Very strange for me. I have never seen App.PrevInstance fail in the way described above. Can you show the complete initialization code?
>Is there a way...
Yes, I see the effect of fRunmode parameter. In fact, if we change the KeepOriginalFormat property of returned picture to false, using its IPicture interface, the effect is same. The modified code fragment shows this.
Dim pic As IPicture, pb As New PropertyBag
Set pic = PictureFromRawBits(B)...
This site uses cookies to help personalise content, tailor your experience and to keep you logged in if you register.
By continuing to use this site, you are consenting to our use of cookies.