View Single Post
  #1   Report Post  
Posted to microsoft.public.excel.programming
David Hepner David Hepner is offline
external usenet poster
 
Posts: 15
Default Reading data from a user form into a sheet

Try this:

Cells(NewRow, 1) = NewRow - 1
For i = 0 To 222
Cells(NewRow, i + 2) = Val(DataArray(i))
Next i

" wrote:

I'm trying to transfer values from a user form into a sheet. User form
data are stored in the vector DataArray and are transfered into the
sheet by:

Cells(NewRow, 1) = NewRow - 1
For i = 0 to 222
Cells(NewRow, i + 2) = DataArray(i)
Next i

It works fine exept that numbers will be formated as text (?) when
being read into the sheet and aligned to the left in the cell. By
double-clicking that cell, the figure will be aligned right and
formated as number. Any suggestions how to get round this?

/Fred