Results 1 to 3 of 3

Thread: Leading zeros

  1. #1
    Lounger
    Join Date
    Apr 2008
    Posts
    41
    Thanks
    0
    Thanked 0 Times in 0 Posts
    Is theer a .Net equivalent to
    strhold = "00000000" & .Cells(nindex, ncolumn)
    ZeroFillString = Right$(strhold, nLength)

    It does not like the ampersand...

    This is for leading zeros when going to excel.

  2. #2
    Super Moderator jscher2000's Avatar
    Join Date
    Feb 2001
    Location
    Silicon Valley, USA
    Posts
    23,112
    Thanks
    5
    Thanked 93 Times in 89 Posts
    Quote Originally Posted by newb View Post
    Is theer a .Net equivalent to
    strhold = "00000000" & .Cells(nindex, ncolumn)
    ZeroFillString = Right$(strhold, nLength)

    It does not like the ampersand...
    Are you converting to VB.Net or C#? I think VB.Net still uses with the ampersand as its string concatenation operator.

  3. #3
    New Lounger
    Join Date
    Dec 2009
    Location
    Rock Hill, South Carolina
    Posts
    5
    Thanks
    0
    Thanked 0 Times in 0 Posts
    vb uses the + for concatenation

Posting Permissions

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