Results 1 to 2 of 2

Thread: Vb Net Excel Com Question

  1. #1

    Thread Starter
    New Member
    Join Date
    Jun 2002
    Location
    NY
    Posts
    8

    Angry Vb Net Excel Com Question

    Trying to do some Cell manipulation/checking..

    I have tried a number of things to determine a value of a cell and none work, all throw me an exception about range not equalling string...
    so I assume I must select the cell, then test for its value BUT..
    anytime I type
    MyExcel.Cells(1,2)
    the next dot after cells only gives me gettype, and no other option from the excel object
    now, i am new to NET..so perhaps this is one of it's things.. I am not sure..here is an example block of code
    I demonstrate the diff things I have tried..

    Dim Myexcel as New Excel.Application()
    Dim A As Integer

    Do Until A = 669
    Do Until tmp <> " "

    If myexcel.Cells(A,2).Text = " " Then
    B = B + 1
    Else
    tmp = myexcel.Cells.Item(B, 2)
    End If
    Loop
    If myexcel.Cells.Item(A, 5) = " " Then
    A = A + 1
    Else

    End If

    Loop

  2. #2

    Thread Starter
    New Member
    Join Date
    Jun 2002
    Location
    NY
    Posts
    8
    I have discovered what works.

    If myexcel.Cells(A,2).Text = " " Then

    Seems to do the trick!

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