LinkBack Thread Tools Search this Thread Display Modes
Prev Previous Post   Next Post Next
  #1   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 34
Default Setting number format by multiplication - possible bug?

I have problems getting the numberformat right, when offsetting a user input
from a user form to a table. The values are formatted as text, which means
that I can't perform math manipulations with the numbers. On the application
side, the xl.helpfile recommends multiplying the "troubled area" by 1. this
works. The relevant area takes the format from the 1, which is formatted as a
number.

Trying to record this procedure (rather unelegant I know) and integrate it
into VBA doesn't work. Can anybody guide me? Recommendations on how to format
the output area or a hint on how I can make the fix described above work are
most welcome.



Private Sub GemClick_Click()
Dim i As Integer
Dim dato As Date
Dim rg As Range, rgBlank As Range

Application.ScreenUpdating = False

Worksheets("Timeseddel").Activate

Range(Cells(15, 3), Cells(31, 7)).ClearContents
Cells(7, 7).ClearContents
'ActiveWorkbook.Save

Cells(15, 3).Activate

With ActiveCell

.Offset(0, 0).Value = LstNavn1.Text
.Offset(0, 1).Value = TxtWkType1.Text
.Offset(0, 2).Value = TextRmk1.Text
.Offset(0, 3).Value = TextTimeDbt1.Text
.Offset(0, 4).Value = TextTimeNonDbt1.Text

.Offset(1, 0).Value = LstNavn2.Text
.Offset(1, 1).Value = TxtWkType2.Text
.Offset(1, 2).Value = TextRmk2.Text
.Offset(1, 3).Value = TextTimeDbt2.Text
.Offset(1, 4).Value = TextTimeNonDbt2.Text
..
..
..
Range("J1").Select
Selection.Copy
Range("F15:G31").Select
Selection.PasteSpecial Paste:=xlPasteAll, Operation:=xlMultiply, _
SkipBlanks:=True
Application.CutCopyMode = False

End With

End sub


 
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
number format in regional setting vista not carried in excel2007 bsm Excel Discussion (Misc queries) 1 March 2nd 10 09:21 AM
Setting number format for a Chart (bars) from C# CAE1030 Excel Programming 0 April 6th 06 07:44 PM
Setting Cell Number Format With A Worksheet Function [email protected] Excel Worksheet Functions 1 December 16th 05 07:37 PM
Error setting number format Bill Sturdevant[_2_] Excel Programming 0 October 6th 05 05:58 PM
Setting number format on range of cells Neils Christoffersen Excel Programming 2 November 19th 04 10:20 PM


All times are GMT +1. The time now is 01:53 PM.

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

About Us

"It's about Microsoft Excel"