CodeGuru Home VC++ / MFC / C++ .NET / C# Visual Basic VB Forums Developer.com
Results 1 to 2 of 2
  1. #1
    Join Date
    Apr 2002
    Posts
    56

    VB6 code to vb .net ....

    hi,
    this is a code in vb6 to round off a number...
    can someone give a code to round of the decimals in vb.net???
    Pl. help.


    Public Sub roundnumber(ByRef roundn, ByVal Decimals As Integer)
    On Error Resume Next
    Dim roundamount As Single, result
    roundamount = 10 ^ Decimals
    result = (CLng((roundn) * roundamount) / roundamount)
    roundn = result

    End Sub


    Thanks in advance.

  2. #2
    Join Date
    May 2000
    Location
    New York, NY, USA
    Posts
    2,878
    Write it in VB6 and then open project in VB.NET and run the wizard to convert
    Iouri Boutchkine
    [email protected]

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  





Click Here to Expand Forum to Full Width

Featured