+ Reply to Thread
Results 1 to 4 of 4

Output Text in specific place

  1. #1
    Registered User
    Join Date
    07-11-2005
    Posts
    30

    Output Text in specific place

    this is pretty easy question but i was wondering how do you output a specific text in a specific place

    the specific place will be determined by a variable that i previously defined, i.e. the end of a set number of rows. the set number of rows are variable each time, hence i need to use a variable

    thanks

  2. #2
    Tom Ogilvy
    Guest

    Re: Output Text in specific place

    Cells(rwNum,"C").Value = "Some kind of text"

    --
    Regards,
    tom Ogilvy

    "narutard" <[email protected]> wrote in
    message news:[email protected]...
    >
    > this is pretty easy question but i was wondering how do you output a
    > specific text in a specific place
    >
    > the specific place will be determined by a variable that i previously
    > defined, i.e. the end of a set number of rows. the set number of rows
    > are variable each time, hence i need to use a variable
    >
    > thanks
    >
    >
    > --
    > narutard
    > ------------------------------------------------------------------------
    > narutard's Profile:

    http://www.excelforum.com/member.php...o&userid=25111
    > View this thread: http://www.excelforum.com/showthread...hreadid=386216
    >




  3. #3
    STEVE BELL
    Guest

    Re: Output Text in specific place

    Worksheets("MySheet").Cells(rw,col).Text = "Text"
    or
    Worksheets("MySheet").Cells(rw,col).Text = str

    where
    Dim rw as Long, col as Long, str as String

    --
    steveB

    Remove "AYN" from email to respond
    "narutard" <[email protected]> wrote in
    message news:[email protected]...
    >
    > this is pretty easy question but i was wondering how do you output a
    > specific text in a specific place
    >
    > the specific place will be determined by a variable that i previously
    > defined, i.e. the end of a set number of rows. the set number of rows
    > are variable each time, hence i need to use a variable
    >
    > thanks
    >
    >
    > --
    > narutard
    > ------------------------------------------------------------------------
    > narutard's Profile:
    > http://www.excelforum.com/member.php...o&userid=25111
    > View this thread: http://www.excelforum.com/showthread...hreadid=386216
    >




  4. #4
    Tom Ogilvy
    Guest

    Re: Output Text in specific place

    both of those raise errors since the TEXT property of a range is read only.

    To the original poster, if you need to write on a sheet that is not the
    active sheet, then you can qualify your reference with the worksheet name
    (if you are writing to the activesheet, you can omit the worksheet
    qualification or use ActiveSheet)

    Dim rwNum as Long
    rwNum = 21
    worksheets("Sheet1").Cells(rwNum,"C").Value = "Some kind of text"

    or
    Dim rwNum as Long, colNum as Long
    rwNum = 21
    colNum = 3
    worksheets("Sheet1").Cells(rwNum,colNum).Value = "Some kind of text"


    The value can be a variable as well.
    Dim rwNum as Long, colNum as Long
    Dim sStr as String
    rwNum = 21
    colNum = 3
    sStr = "Some kind of text"
    worksheets("Sheet1").Cells(rwNum,colNum).Value = sStr

    --
    Regards,
    Tom Ogilvy



    "STEVE BELL" <[email protected]> wrote in message
    news:w3AAe.39948$ZN6.971@trnddc02...
    > Worksheets("MySheet").Cells(rw,col).Text = "Text"
    > or
    > Worksheets("MySheet").Cells(rw,col).Text = str
    >
    > where
    > Dim rw as Long, col as Long, str as String
    >
    > --
    > steveB
    >
    > Remove "AYN" from email to respond
    > "narutard" <[email protected]> wrote

    in
    > message news:[email protected]...
    > >
    > > this is pretty easy question but i was wondering how do you output a
    > > specific text in a specific place
    > >
    > > the specific place will be determined by a variable that i previously
    > > defined, i.e. the end of a set number of rows. the set number of rows
    > > are variable each time, hence i need to use a variable
    > >
    > > thanks
    > >
    > >
    > > --
    > > narutard
    > > ------------------------------------------------------------------------
    > > narutard's Profile:
    > > http://www.excelforum.com/member.php...o&userid=25111
    > > View this thread:

    http://www.excelforum.com/showthread...hreadid=386216
    > >

    >
    >




+ Reply to Thread

Thread Information

Users Browsing this Thread

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

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