Hi I have code in VBA i want to convert it to VB.NET
the code

  Dim lastrow As Integer
    Dim curRow As Integer
    Dim newrow As Integer
    lastrow = exWS2.Cells.Rows.End(XlDirection.xlDown).Row
    exWS2.Cells(8, 6).Value = "Max"
    exWS2.Cells(8, 7).Value = "=Max(B2:B" & lastrow & ")"
    newrow = 8
    For curRow = 2 To lastrow
        If exWS2.Cells(curRow, 2) = exWS2.Cells(8, 7).Value Then
            newrow = newrow + 1
            exWS2.Cells(newrow, 6).Value = exWS2.Cells(curRow, 1).Value
        End If
    Next curRow
Re: convert code VBA to VB.NET 80 80

Congratulations! You're no longer a DaniWeb newbie.<br /> <br />
Your DaniWeb account has just been upgraded from newbie status and now you have the ability to take advantage of everything the community has to offer.<br /> <br />
You can now enjoy an advertisement-free DaniWeb by ticking the checkbox to Disable Ads in your profile. You will no longer have to fill out the human verification check when you post. You can also now send unlimited private messages, participate in live chat, opt-in to mailing list-style notifications which allows you to read and contribute posts via email, contribute new code snippets, contribute editorial, access Area 51 and tag articles with never-before-used tags.

Re: convert code VBA to VB.NET 80 80

Congratulations! You're no longer a DaniWeb newbie.<br /> <br />

Why do people feel the need to post the contents of this notification? I'm genuinely curious.

Re: convert code VBA to VB.NET 80 80

without causes

Re: convert code VBA to VB.NET 80 80

Do you need to have access to excel from VB.NET or is it just a translation you want?

Re: convert code VBA to VB.NET 80 80

i want to translate the code to vb.net to be useful to access excel from vb.net

Re: convert code VBA to VB.NET 80 80

To work with Excel from VB.NET, this and the folowing pages might be useful.

Re: convert code VBA to VB.NET 80 80

thanks and translation of the code please :)

Be a part of the DaniWeb community

We're a friendly, industry-focused community of 1.18 million developers, IT pros, digital marketers, and technology enthusiasts learning and sharing knowledge.