View Single Post
  #1   Report Post  
Posted to microsoft.public.excel.programming
Michael Deathya Michael Deathya is offline
external usenet poster
 
Posts: 5
Default % Formated cells randomly changing to hh:mm:ss format

Hi,

I am using Excel97 VBA to populate named cells on Sheet1. The source
data is in Sheet2 (All cells formatted 'General'. I have code to pick
up the values into an array and it works fine.

My issue is that Sheet1 cells that are formatted as %s are *sometimes*
(I can't see the pattern) reformatted to the time format when I place a
value in them. I.e. What should be 92% can show up as 10:04:48 PM

The code I am using to populate the named cells is:
for i = 1 to 500
valueName=myvalues(i,1)
Thisworkbook.names(valueName).referstorange.value = myvalues(i,2)
next

Any ideas?

Thanks,
Michael Deathya