ExcelBanter

ExcelBanter (https://www.excelbanter.com/)
-   Excel Programming (https://www.excelbanter.com/excel-programming/)
-   -   Unable to Assign Value To Cell (https://www.excelbanter.com/excel-programming/287594-unable-assign-value-cell.html)

Aanika

Unable to Assign Value To Cell
 
All,

I would appreciate your help.

In my VBA code I assign data to cells, which works fine
for me, but when my colleague tries my VBA code on his PC
it doesnt work. This code is displayed below:

Cells(MyRow, MyCol) = MyOutput

When I have stepped through this on my colleagues
computer the variables MyRow, MyCol and MyOutput have the
correct values to assign the output to the cell but it
fails to do so.

I have also noticed that I am unable to edit the value of
the cell when I have added that cell to the 'Watches' in
the VBA Editor.

Thanks

Aanika

Mark Rosenkrantz[_2_]

Unable to Assign Value To Cell
 
Aanika;

Just a few notes.

Did you declare variables ?
When your lines of code don't begin with "Option Excplicit" and his' do, you
might have a solution.

Is the workbook and the worksheet in which you are working Active.
Is there no other sheet open so to say.

Hope it helps.

Mark.

More Excel ? www.rosenkrantz.nl or

--------------------------------------------------------------------





"Aanika" wrote in message
...
All,

I would appreciate your help.

In my VBA code I assign data to cells, which works fine
for me, but when my colleague tries my VBA code on his PC
it doesnt work. This code is displayed below:

Cells(MyRow, MyCol) = MyOutput

When I have stepped through this on my colleagues
computer the variables MyRow, MyCol and MyOutput have the
correct values to assign the output to the cell but it
fails to do so.

I have also noticed that I am unable to edit the value of
the cell when I have added that cell to the 'Watches' in
the VBA Editor.

Thanks

Aanika





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

Powered by vBulletin® Copyright ©2000 - 2025, Jelsoft Enterprises Ltd.
ExcelBanter.com