Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.programming
reb reb is offline
external usenet poster
 
Posts: 3
Default changing a text value to a number value in a textbox?

i can send a text value ,but not a number value to my worksheet, here the code
Private Sub TextBox1_change(
Set c = Worksheets("Sheet1").Range("a2"
c.Value = TextBox
help???
  #2   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 1,080
Default changing a text value to a number value in a textbox?

Your code works for me. Try with the first line:

Dim c As Range

It may help. In any event, it's very bad programming practice not to declare
your variables explicitly.

--

Vasant

"reb" wrote in message
...
i can send a text value ,but not a number value to my worksheet, here the

code:
Private Sub TextBox1_change()
Set c = Worksheets("Sheet1").Range("a2")
c.Value = TextBox1
help???



  #3   Report Post  
Posted to microsoft.public.excel.programming
reb reb is offline
external usenet poster
 
Posts: 3
Default changing a text value to a number value in a textbox?

tried it ,but it still shows a text,problem is ,it won't add,,shows as a text inpu
Private Sub TextBox1_change(
Dim c As Rang
Set c = Worksheets("Sheet1").Range("a2"
c.Value = TextBox1
  #4   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 1,080
Default changing a text value to a number value in a textbox?

Sorry, I don't understand what you mean. Perhaps you have the cell formatted
as Text.

--

Vasant

"reb" wrote in message
...
tried it ,but it still shows a text,problem is ,it won't add,,shows as a

text input
Private Sub TextBox1_change()
Dim c As Range
Set c = Worksheets("Sheet1").Range("a2")
c.Value = TextBox1



  #5   Report Post  
Posted to microsoft.public.excel.programming
reb reb is offline
external usenet poster
 
Posts: 3
Default changing a text value to a number value in a textbox?

tried formating cell in excel worksheet as a number ,still ,no help ,i can use an "if "command in vba to change 1 to 0
if checkbox1.value the
sheet1.range("a2")=
els
sheet1.range(A2")=
end i
but ,i could only get it to work with a checkbox ,and an optionsbutton ,so i'm wondering ,if it is the way a textbox is set up ,and if so ,then i'll need to find a work aroun
p.
sorry about my programming ,just started reading about it a week ago
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
Changing text to number DIAMONDGIRL Excel Worksheet Functions 4 November 7th 08 05:22 PM
Verify Textbox Information is a Number and Not Text pallaver Excel Discussion (Misc queries) 6 July 17th 08 09:00 AM
Text Import Wizard - Changing number format Thad Meyers[_2_] Excel Discussion (Misc queries) 0 August 13th 07 09:42 PM
copying a cell and changing the formating from number to text Mark Gloves Excel Discussion (Misc queries) 3 June 22nd 07 01:51 AM
edit number in cell without it changing to text rklremote Excel Discussion (Misc queries) 1 May 19th 05 10:22 PM


All times are GMT +1. The time now is 07:51 AM.

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"