PC Review


Reply
Thread Tools Rate Thread

how do i type something in a cell using vba?

 
 
Giorgio
Guest
Posts: n/a
 
      10th Jul 2008
in a vba code, i use worksheets.()value... to attribute a value to a
variable. is that correct? and how do i actually print something a variable
contains, like eg sum=123 and i want to print 123 in cell A3 in worksheet Raw
of workbook 1.xls. funnily, i cannot get this answer in simple help of
office. a rookie in vba, i must admit! thanks
 
Reply With Quote
 
 
 
 
Per Jessen
Guest
Posts: n/a
 
      10th Jul 2008
On 10 Jul., 22:44, Giorgio <(E-Mail Removed)> wrote:
> in a vba code, i use worksheets.()value... to attribute a value to a
> variable. is that correct? and how do i actually print something a variable
> contains, like eg sum=123 and i want to print 123 in cell A3 in worksheet Raw
> of workbook 1.xls. funnily, i cannot get this answer in simple help of
> office. a rookie in vba, i must admit! thanks


Hi

Sum = 123
Worksheets("Raw").Range("A3") = Sum

Reards,
Per
 
Reply With Quote
 
 
 
 
salgud
Guest
Posts: n/a
 
      11th Jul 2008
On Thu, 10 Jul 2008 13:44:04 -0700, Giorgio wrote:

> in a vba code, i use worksheets.()value... to attribute a value to a
> variable. is that correct? and how do i actually print something a variable
> contains, like eg sum=123 and i want to print 123 in cell A3 in worksheet Raw
> of workbook 1.xls. funnily, i cannot get this answer in simple help of
> office. a rookie in vba, i must admit! thanks


simplest way is something like:
activesheet.range.("A3") = sum
Substitute the real spreadsheet name for "activesheet".
There are lot of other ways to do this, depending on the context.
Hope this helps in your world.
 
Reply With Quote
 
 
 
Reply

Thread Tools
Rate This Thread
Rate This Thread:

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are Off


Similar Threads
Thread Thread Starter Forum Replies Last Post
When I type in a cell, I do not see what I type in the cell =?Utf-8?B?SHVzZXlpbg==?= Microsoft Excel Misc 0 21st Aug 2007 02:52 PM
Using VB to type something into a cell petros89 Microsoft Excel Programming 2 29th Nov 2005 03:38 PM
Is it (null == something) or (something == null)? =?Utf-8?B?U3Rhbm8=?= Microsoft Dot NET Framework 34 21st Sep 2004 10:08 PM
"If the user enters something, return something, otherwise return everything" Chris Mortimore Microsoft Access Queries 2 6th Sep 2004 03:35 PM
Something works, something don't. y Microsoft Excel Programming 2 7th Apr 2004 08:26 AM


Features
 

Advertising
 

Newsgroups
 


All times are GMT +1. The time now is 12:10 PM.