|
-
Nov 22nd, 2000, 07:05 PM
#1
Thread Starter
New Member
how do i write data to a specific cell in excel?
thanks
Liam
-
Nov 22nd, 2000, 11:46 PM
#2
Fanatic Member
it's easy
try this..
Activecell.value = "myText"
if that doesn't work, you should provide more details of what you are really trying to accomplish. 
-
Nov 23rd, 2000, 12:58 AM
#3
Conquistador
or try this:
Code:
Range("A10").Value = "VB-World" 'replace a10 with what cell you want.
-
Nov 23rd, 2000, 04:55 AM
#4
New Member
Isn't ActiveCell.Value reading out? I thought that giving a cell data is done by ActiveCell.FormulaR1C1 = "blabla"...
-
Nov 23rd, 2000, 05:20 AM
#5
Conquistador
activecell.value can be used to get the active cell's value or to set it
i.e
msgbox activecell.value
would show the activecells value
activecell.value = "Hey"
set the activecells value to "Hey"
-
Nov 23rd, 2000, 05:58 AM
#6
Fanatic Member
There are a number of accessing cells in an excel worksheet:
Reference Meaning
Range("A1") Cell A1
Range("A1:B5") Cells A1 through B5
Range("C5 9,G9:H16") A multiple-area selection
Range("A:A") Column A
Range("1:1") Row one
Range("A:C") Columns A through C
Range("1:5") Rows one through five
Range("1:1,3:3,8:8") Rows one, three, and eight
Range("A:A,C:C,F:F") Columns A, C, and F
OR
Worksheets("Sheet1").Cells(6, 1).Value = 10
OR
Reference Meaning
Rows(1) Row one
Rows All the rows on the worksheet
Columns(1) Column one
Columns("A") Column one
Columns All the columns on the worksheet
e.g.
Code:
Sub SeveralRows()
Worksheets("Sheet1").Activate
Dim myUnion As Range
Set myUnion = Union(Rows(1), Rows(3), Rows(5))
myUnion.Font.Bold = True
End Sub
OR
Worksheets("Sheet1").[A1:B5].ClearContents
For more help start excel, on the visual basic toolbar click the visual basic editor button. click on help and type
'referencing cells' in the office assistant, click Search.
That should give you an link of 'How to reference cells and ranges'. There is a lot of help in there.
Posting Permissions
- You may not post new threads
- You may not post replies
- You may not post attachments
- You may not edit your posts
-
Forum Rules
|
Click Here to Expand Forum to Full Width
|