Results 1 to 3 of 3

Thread: brackets around numbers problem

  1. #1

    Thread Starter
    Addicted Member
    Join Date
    Oct 2011
    Posts
    255

    brackets around numbers problem

    hi i have this code that goes to an excel file look or a word and copies the value i want here is the code
    Code:
     oRng = oWSSheet.Cells.Find("UNREALIZED GAIN - FVTPL_HFT_FT (SHORT) (19611104)", , _
                          Excel.XlFindLookIn.xlValues, Excel.XlLookAt.xlPart, _
                          Excel.XlSearchOrder.xlByRows, Excel.XlSearchDirection.xlNext, False)
            ' MsgBox("Value '" & oRng.Value & "' found at '" & oRng.Address)
            Me.UNGFts = oRng.Offset(0, 5).Value
            oRng = Nothing
    some of the numbers have brackets around it. how can i get it to remove brackets or ignore them so it picks the value up right
    thanks

  2. #2
    Angel of Code Niya's Avatar
    Join Date
    Nov 2011
    Posts
    9,017

    Re: brackets around numbers problem

    I believe Excel represents negative number with brackets.
    Treeview with NodeAdded/NodesRemoved events | BlinkLabel control | Calculate Permutations | Object Enums | ComboBox with centered items | .Net Internals article(not mine) | Wizard Control | Understanding Multi-Threading | Simple file compression | Demon Arena

    Copy/move files using Windows Shell | I'm not wanted

    C++ programmers will dismiss you as a cretinous simpleton for your inability to keep track of pointers chained 6 levels deep and Java programmers will pillory you for buying into the evils of Microsoft. Meanwhile C# programmers will get paid just a little bit more than you for writing exactly the same code and VB6 programmers will continue to whitter on about "footprints". - FunkyDexter

    There's just no reason to use garbage like InputBox. - jmcilhinney

    The threads I start are Niya and Olaf free zones. No arguing about the benefits of VB6 over .NET here please. Happiness must reign. - yereverluvinuncleber

  3. #3

    Thread Starter
    Addicted Member
    Join Date
    Oct 2011
    Posts
    255

    Re: brackets around numbers problem

    ok thanks

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