Home |
Search |
Today's Posts |
|
#1
![]()
Posted to microsoft.public.excel.programming
|
|||
|
|||
![]()
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 |
#2
![]()
Posted to microsoft.public.excel.programming
|
|||
|
|||
![]()
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 |
Reply |
Thread Tools | Search this Thread |
Display Modes | |
|
|
![]() |
||||
Thread | Forum | |||
User form/spread sheet | Excel Programming | |||
reading data in pop-up form | Excel Discussion (Misc queries) | |||
Toggle between excel sheet and user form | Excel Programming | |||
User Form-error 1004 unless opened in sheet w/combobox data | Excel Programming | |||
Displaying part of a sheet on a user form | Excel Programming |