LinkBack Thread Tools Search this Thread Display Modes
Prev Previous Post   Next Post Next
  #1   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 12
Default Error writing value to cell

I want my VBA program to change the value of a cell. The cell
references are correct but the "write" or assignment step doesn't
work.

As a test, this line returns the correct cell location:

A = Worksheets("Sheet1").Cells(myLocRow(i) + Offset_Row, myLocCol(i) +
Offset_Col).Address

After the following test statement, variable A contains the current
value of the cell:

A = Worksheets("Sheet1").Cells(myLocRow(i) + Offset_Row, myLocCol(i) +
Offset_Col).Value

However, if I replace it with this step, something does not work
right:

Worksheets("Sheet1").Cells(myLocRow(i) + Offset_Row, myLocCol(i) +
Offset_Col).Value = "Test"

I added a temporary Stop statement immediately after the line above.
However, if I single-step through the above line, it does not reach
the Stop statement. Instead, excecution jumps to another step before
the assignment.

HELP! I have no idea what to do next.



--
Steven M - lid
(remove wax and invalid to reply)

A fool and his money are soon elected. -- Will Rogers
 
Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Posting Rules

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


Similar Threads
Thread Thread Starter Forum Replies Last Post
Error type mismatch in writing macro ub Excel Worksheet Functions 2 September 26th 07 12:48 PM
Issue writing IF OR Error Formula Types lozzam New Users to Excel 1 October 26th 06 08:14 AM
Error from losing power while writing macro. Recovery help? MSgtMark Excel Discussion (Misc queries) 2 February 2nd 06 10:35 PM
Writing a macro to copy first cell down until next cell has data Gerald[_2_] Excel Programming 1 August 10th 05 10:06 PM
Error 50290: Error writing to Worksheet while using an ActiveX Control emblair3 Excel Programming 3 February 24th 04 06:03 PM


All times are GMT +1. The time now is 02:51 PM.

Powered by vBulletin® Copyright ©2000 - 2025, Jelsoft Enterprises Ltd.
Copyright ©2004-2025 ExcelBanter.
The comments are property of their posters.
 

About Us

"It's about Microsoft Excel"