Formula not working always in excel suing VBA

By redvamsi ·
Hi all

i've used a formula something like

activesheet.cells(row,col).formula = "='C:\Documents and Settings\Administrator\Desktop\[sdfsdf.xls]Sheet1'!$A$12"

this line will be in a loop , iterating for a couple of rows.

But what is happening is, the formula works fine for most of the cells,
but for a couple of a cells, ....instead of the result, the formula itself shows up in the cell

what is going on? how can i fix this??

i have checked adjusting the formats .. it still persists


This conversation is currently closed to new comments.

Thread display: Collapse - | Expand +

All Answers

Collapse -


by kenneth.johnson9 In reply to Formula not working alway ...

My guess is that prticular cell has been formatted as a label. I know what you said... but once it is text, if you change the format to general, it will still show the "text" of the formula. It MUST be set to general PRIOR to typing or insering the formula.

hope that helps.

Related Discussions

Related Forums