Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 1
Default Reading data from a user form into a sheet

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   Report Post  
Posted to microsoft.public.excel.programming
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

Reply
Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Posting Rules

Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On


Similar Threads
Thread Thread Starter Forum Replies Last Post
User form/spread sheet hngo Excel Programming 1 July 12th 05 12:01 PM
reading data in pop-up form Gate Excel Discussion (Misc queries) 1 March 9th 05 02:16 AM
Toggle between excel sheet and user form Omar Excel Programming 2 March 1st 05 07:11 AM
User Form-error 1004 unless opened in sheet w/combobox data dpaulos[_2_] Excel Programming 2 January 27th 04 03:25 AM
Displaying part of a sheet on a user form Phillip[_4_] Excel Programming 1 January 15th 04 04:20 AM


All times are GMT +1. The time now is 04:43 AM.

Powered by vBulletin® Copyright ©2000 - 2025, Jelsoft Enterprises Ltd.
Copyright ©2004-2025 ExcelBanter.
The comments are property of their posters.
 

About Us

"It's about Microsoft Excel"