Results 1 to 3 of 3

Thread: [RESOLVED] Return as string

  1. #1

    Thread Starter
    Member
    Join Date
    Oct 2009
    Posts
    42

    Resolved [RESOLVED] Return as string

    Hi all,

    The value from sheet1's column G should be 00, but when the value in sheet2's column G is 0.

    What should i do in order to retain the value as 00?

    Please help!!!

    Thanks!

    Code:
    e.Rows(d).Value = i.Rows(d).Value
    
    Do Until IsEmpty(i.Range("G" & j))
    
    If i.Range("G" & j).Value = "00" Then
    d = d + 1
    e.Rows(d).Value = i.Rows(j).Value
    End If
    j = j + 1
    Loop
    Last edited by DivinationX; Dec 21st, 2009 at 03:13 AM.

  2. #2
    VB Addict Pradeep1210's Avatar
    Join Date
    Apr 2004
    Location
    Inside the CPU...
    Posts
    6,614

    Re: Return as string

    Set the cell format of that column to "00"
    Pradeep, Microsoft MVP (Visual Basic)
    Please appreciate posts that have helped you by clicking icon on the left of the post.
    "A problem well stated is a problem half solved." — Charles F. Kettering

    Read articles on My Blog101 LINQ SamplesJSON ValidatorXML Schema Validator"How Do I" videos on MSDNVB.NET and C# ComparisonGood Coding PracticesVBForums Reputation SaverString EnumSuper Simple Tetris Game


    (2010-2013)
    NB: I do not answer coding questions via PM. If you want my help, then make a post and PM me it's link. If I can help, trust me I will...

  3. #3

    Thread Starter
    Member
    Join Date
    Oct 2009
    Posts
    42

    Re: Return as string

    Hey pradeep, many thanks for your assistance, managed to solve it.

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