Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 1
Default currency and textbox.


How is the value being pasted to the worksheet?

Can't you just format the destination cell as Currency?


--
Norie
------------------------------------------------------------------------
Norie's Profile: http://www.excelforum.com/member.php...o&userid=19362
View this thread: http://www.excelforum.com/showthread...hreadid=374123

  #2   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 1
Default currency and textbox.


Leith,

I have the below code

Private Sub amountofclaim_AfterUpdate()
Worksheets("data").Visible = True
cellmoney = ActiveCell.Offset(0, 21).Value
Worksheets("data").cellmoney = Format(amountofclaim.Text, "Currency")

AmountOfClaim.Value = Application.Text(AmountOfClaim.Value, "0.00")
End Sub

And it is saying object doesn't support this property or method and is
selecting the worksheets("data").cellmoney part


--
funkymonkUK
------------------------------------------------------------------------
funkymonkUK's Profile: http://www.excelforum.com/member.php...o&userid=18135
View this thread: http://www.excelforum.com/showthread...hreadid=374123

  #3   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 1
Default currency and textbox.


Hello Funymonk,

You need to Dimension CellMoney as a Range. Here is the corrected
code.



Code:
--------------------
Private Sub amountofclaim_AfterUpdate()
Dim CellMoney As Range
Worksheets(\"data\").Visible = True

Set cellmoney = ActiveCell.Offset(0, 21)

Worksheets(\"data\").cellmoney.Value = Format(amountofclaim.Text, \"Currency\")

AmountOfClaim.Value = Application.Text(AmountOfClaim.Value, \"0.00\")

End Sub
--------------------


Sincerely,
Leith Ross


--
Leith Ross
------------------------------------------------------------------------
Leith Ross's Profile: http://www.excelforum.com/member.php...o&userid=18465
View this thread: http://www.excelforum.com/showthread...hreadid=374123

  #4   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 1
Default currency and textbox.


Hi Funkymonk

Private Sub amountofclaim_AfterUpdate()
Worksheets("data").Visible = True
cellmoney = ActiveCell.Offset(0, 21).Value

Mangesh this line will assign cellmoney with some value


Worksheets("data").cellmoney = Format(amountofclaim.Text, "Currency")

Mangesh I don't understand this line. Cellmoney is some variable, an
you should be getting the error at this line


AmountOfClaim.Value = Application.Text(AmountOfClaim.Value, "0.00")
End Sub


What is the name of the textbox. On press of the submit button yo
simply need to do something like this:
Sheet1.Range("A1") = TextBox1.Value


Manges

--
mangesh_yada
-----------------------------------------------------------------------
mangesh_yadav's Profile: http://www.excelforum.com/member.php...fo&userid=1047
View this thread: http://www.excelforum.com/showthread.php?threadid=37412

  #5   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 1
Default currency and textbox.



Hi Funkymonk,

didn't see your last post before I posted my previous post. Good that
your problem has solved.

Mangesh


--
mangesh_yadav
------------------------------------------------------------------------
mangesh_yadav's Profile: http://www.excelforum.com/member.php...o&userid=10470
View this thread: http://www.excelforum.com/showthread...hreadid=374123



  #6   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 1
Default currency and textbox.


Mangesh you helped me with this data textbox i had which i am copyin
the code.


PHP code
-------------------
Private Sub TextBox5_Change()
' TextBox5.MaxLength = 10
Dim L

L = Len(TextBox5.Text)

If L 10 Then
MsgBox "Maximum Length is 10 Characters", vbOKOnly + vbExclamation
With TextBox5
.Text = Left(.Text, 10)
'.Text = ""
.SetFocus
End With
End If

If Len(TextBox5) = 2 Then
If Right(TextBox5, 2) 31 Then
MsgBox "Invalid date. Please enter correct value for day"
TextBox5.SetFocus
Exit Sub
Else
TextBox5 = TextBox5 & "/"
End If
End If

If Len(TextBox5) = 5 Then
If Right(TextBox5, 2) 12 Then
MsgBox "Invalid date. Please enter correct value for month"
TextBox5.SetFocus
Exit Sub
Else
TextBox5 = TextBox5 & "/"
End If
End If



End Su
-------------------


textbox5 is a date is there a way to make the cell that it goes int
realise that it is a date. i formated the cell which it does into as
date it

this is the part of the code after the user has clicked the OK butto
this happens

'Date of
ActiveCell.Offset(0, 23).Value = TextBox5.Value
TextBox5 = "

--
funkymonkU
-----------------------------------------------------------------------
funkymonkUK's Profile: http://www.excelforum.com/member.php...fo&userid=1813
View this thread: http://www.excelforum.com/showthread.php?threadid=37412

  #7   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 1
Default currency and textbox.


it works however in the textbox like the code above says the user enters
in this 15/02/2003. (Which I would actually prefer to have as they enter
in 15/02/03 if you could help with that refer to the above code) at the
moment it is putting the date in i typed in the textbox 15/02/2003 and
it transfered it to the sheet and the format and is displaying it as
02/15/03 which I dont want i want it as dd/mm/yy


--
funkymonkUK
------------------------------------------------------------------------
funkymonkUK's Profile: http://www.excelforum.com/member.php...o&userid=18135
View this thread: http://www.excelforum.com/showthread...hreadid=374123

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
currency and textbox. mangesh_yadav[_214_] Excel Programming 4 May 26th 05 12:51 PM
currency and textbox. funkymonkUK[_5_] Excel Programming 0 May 26th 05 12:37 PM
currency and textbox. Leith Ross[_15_] Excel Programming 0 May 26th 05 12:36 PM
currency and textbox. funkymonkUK[_7_] Excel Programming 0 May 26th 05 12:36 PM
Textbox with currency format C. Thies Excel Programming 2 July 2nd 04 01:15 AM


All times are GMT +1. The time now is 04:15 PM.

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"