Results 1 to 3 of 3

Thread: how to show data in another sheet instead of msgbox

  1. #1

    how to show data in another sheet instead of msgbox



    Register for a FREE account, and/
    or Log in to avoid these ads!

    hi I written the below code it will display the no of rows in msg box.but I want to show that value in another sheet collumn

    Code:
    sub myrows()
    dim rows as single
    rows=sheet1.usedrange.rows.count
    msgbox(rows)
    end sub
    Last edited by Zack Barresse; 2014-03-07 at 09:19 PM. Reason: Added CODE tags

  2. #2
    Super Moderator p45cal's Avatar
    Join Date
    Dec 2012
    Posts
    1,398
    Articles
    0
    Excel Version
    365
    Quote Originally Posted by toravietl View Post
    hi I written the below code it will display the no of rows in msg box.but I want to show that value in another sheet collumn

    Code:
    sub myrows()
    dim rows as single
    rows=sheet1.usedrange.rows.count
    msgbox(rows)
    end sub
    Code:
    sub myrows()
    dim rows as single
    rows=sheet1.usedrange.rows.count
    sheet2.range("C3")=rows
    end sub

  3. #3
    Thanks.Its working fine.
    Quote Originally Posted by p45cal View Post
    Code:
    sub myrows()
    dim rows as single
    rows=sheet1.usedrange.rows.count
    sheet2.range("C3")=rows
    end sub

Posting Permissions

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