Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations Chris Miller on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

How to read excel with a gap in vb 6? 1

Status
Not open for further replies.

Niki_S

Programmer
Jun 4, 2021
232
LK
This is my code.

Code:
  SMV1 = oXLSheet.Range("H12:H138").Value


    cboSMV.Clear
   For lngRow1 = LBound(SMV1, 1) To UBound(SMV1, 1)
    If Not IsEmpty(SMV1(lngRow1, 1)) Then
            cboSMV.AddItem SMV1(lngRow1, 1)
    End If
   Next lngRow1

The format of the excel is as below,

Code:
[highlight #FCE94F]12      12.0[/highlight]
13
14      100
15
[highlight #FCE94F]16      15.87[/highlight]
17
18      50
19
[highlight #FCE94F]20      48.12[/highlight]
21

I want get the highlighted values which are going 4 by 4. How can I take this output?

Thank you
 
[tt]For lngRow1 = LBound(SMV1, 1) To UBound(SMV1, 1) Step 4[/tt] ?


combo
 
Thank you for you support....it's work now.[bigsmile]
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top