+ Reply to Thread
Results 1 to 5 of 5

Reading the values from excel cells using VB Script and posting them in the other cells

  1. #1
    Registered User
    Join Date
    12-24-2013
    Location
    Chennai
    MS-Off Ver
    Excel 2010
    Posts
    2

    Reading the values from excel cells using VB Script and posting them in the other cells

    Hi All,

    I want to knew the mistake which I am doing when reading the values from B6 cells and manipulate it using VB script. As mentioned in the example below:

    Attachment.png

    The code which I am using is
    [B]
    Please Login or Register  to view this content.
    Can you please let me know the mistake in this code.

    With Regards,
    Giriesh M
    Last edited by Giriesh; 12-27-2013 at 04:05 AM.

  2. #2
    Valued Forum Contributor Sadath31's Avatar
    Join Date
    03-02-2011
    Location
    Dammam, Saudi Arabia
    MS-Off Ver
    Office 365
    Posts
    452

    Re: Reading the values from excel cells using VB Script and posting them in the other cell

    should be

    ActiveSheet.Cells(6, 2).Value <> " " Then

    or
    ActiveSheet.Range("B6").Value <> " " Then

  3. #3
    Forum Guru Winon's Avatar
    Join Date
    02-20-2007
    Location
    East Rand, R.S.A.
    MS-Off Ver
    2010
    Posts
    6,113

    Re: Reading the values from excel cells using VB Script and posting them in the other cell

    Post deleted
    Last edited by Winon; 12-27-2013 at 04:23 AM. Reason: Code tags added as requested
    Please consider:

    Be polite. Thank those who have helped you. Then Click on the star icon in the lower left part of the contributor's post and add Reputation. Cleaning up when you're done. If you are satisfied with the help you have received, then Please do Mark your thread [SOLVED] .

  4. #4
    Registered User
    Join Date
    12-24-2013
    Location
    Chennai
    MS-Off Ver
    Excel 2010
    Posts
    2

    Re: Reading the values from excel cells using VB Script and posting them in the other cell

    Hi Sadath,
    Even after changing the code as you mentioned it is throwing the error.

    With Regards,
    Giriesh M

  5. #5
    Forum Guru Winon's Avatar
    Join Date
    02-20-2007
    Location
    East Rand, R.S.A.
    MS-Off Ver
    2010
    Posts
    6,113

    Re: Reading the values from excel cells using VB Script and posting them in the other cell

    Hello Giriesh,

    Please could you upload a sample Workbook, complete with your code, and showing us how you would the outcome to look like? I appears to me that you want to insert a Row somewhere if B6 is empty.

    Regards

+ Reply to Thread

Thread Information

Users Browsing this Thread

There are currently 1 users browsing this thread. (0 members and 1 guests)

Similar Threads

  1. Run a macro outside Excel from VB script file in an empty sheet all over the cells.
    By Deepak_MSBI in forum Excel Programming / VBA / Macros
    Replies: 1
    Last Post: 11-29-2013, 09:34 AM
  2. Excel VB Script Required to Insert PDF objects, Merge Cells and Format
    By timepass111 in forum Excel Programming / VBA / Macros
    Replies: 0
    Last Post: 09-17-2011, 07:29 PM
  3. Excel 2007 - not reading cells as numbers
    By garybarrow in forum Excel - New Users/Basics
    Replies: 2
    Last Post: 01-27-2010, 01:21 PM
  4. reading data from merged cells in excel using a macro
    By varmabjr in forum Excel Programming / VBA / Macros
    Replies: 2
    Last Post: 03-29-2007, 12:07 PM
  5. Reading and counting cells with certain values
    By bagoxc in forum Excel General
    Replies: 3
    Last Post: 09-15-2006, 04:22 PM

Bookmarks

Posting Permissions

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

Search Engine Friendly URLs by vBSEO 3.6.0 RC 1