Question Locked

Formula not working always in excel suing VBA

0 helpful
2 replies
Closed to new repliesThis discussion is closed. It stays readable, but it takes no new replies.

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

thanks

2 replies

by kenneth.johnson9

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.

This discussion is closed to new replies.