Home |
Search |
Today's Posts |
#1
Posted to microsoft.public.excel.programming
|
|||
|
|||
Unable to write to a cell
I am having surprising difficulting wriiting to a cell within a worksheet. I
have tried various approaches and have receive the same erro on all attempts; Code below Set rawRange = Range("B5") rawRange.Value = "data" Or ActiveWorkbook.Worksheets("test1").Cells(2, 2).Value = "Please work" in the first example I can read the data out via the immediate window, but can't write out.. I get this error "Application-defined or object-defined error" Please help!!! |
#2
Posted to microsoft.public.excel.programming
|
|||
|
|||
Unable to write to a cell
David,
try this: Range("B5").Value = "Try this" If you want to operate with variables (rowRange etc.) you have to define them first (Dim rowRange as LOng) "David A." wrote: I am having surprising difficulting wriiting to a cell within a worksheet. I have tried various approaches and have receive the same erro on all attempts; Code below Set rawRange = Range("B5") rawRange.Value = "data" Or ActiveWorkbook.Worksheets("test1").Cells(2, 2).Value = "Please work" in the first example I can read the data out via the immediate window, but can't write out.. I get this error "Application-defined or object-defined error" Please help!!! |
#3
Posted to microsoft.public.excel.programming
|
|||
|
|||
Unable to write to a cell
David,
Try this sub: Sub addata() Dim rawRange as Range ' It's important to define as Range _ instead of other define Set rawRange = Range("B5") rawRange.Value = "data" End Sub -- Regards, Halim "Thomas" wrote: David, try this: Range("B5").Value = "Try this" If you want to operate with variables (rowRange etc.) you have to define them first (Dim rowRange as LOng) "David A." wrote: I am having surprising difficulting wriiting to a cell within a worksheet. I have tried various approaches and have receive the same erro on all attempts; Code below Set rawRange = Range("B5") rawRange.Value = "data" Or ActiveWorkbook.Worksheets("test1").Cells(2, 2).Value = "Please work" in the first example I can read the data out via the immediate window, but can't write out.. I get this error "Application-defined or object-defined error" Please help!!! |
Reply |
Thread Tools | Search this Thread |
Display Modes | |
|
|
Similar Threads | ||||
Thread | Forum | |||
I WANT TO WRITE 18 DIGITS FIGURE IN A SINGLE CELL. bu i m unable. | Excel Discussion (Misc queries) | |||
Can I write an infinite amount in a cell with expanding the cell? | Excel Discussion (Misc queries) | |||
Why am I unable to link a cell in one worksheet to a cell in anot. | Excel Discussion (Misc queries) | |||
Unable to set the active cell from VBA | New Users to Excel | |||
Question: Cell formula or macro to write result of one cell to another cell | Excel Programming |