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

hey everyone

I was just wondering if you could please answer 2 simple questions I
have...

1) What is the code to put text into a cell? eg, what code would I add
to a comand button to make cell A1 say "hello"?

2) And, If i have a userform with two option buttons, then when I start
the program, the first option button is automatically selected. Is
there a code so that both buttons remain "unselected"?

Thanks so much, Jerome

  #2   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 27,285
Default two questions

Private Sub CommandButton1_Click()
With Worksheets("Sheet1")
.Range("A1").Value = "Hello"
' or
'.Range("A1").Value = Userform1.Textbox1.Text
End With
End Sub

In the VBE select the option button and look at its properties. Set the
value property to false.

Do this to both option buttons.

--
Regards,
Tom Ogilvy

"Jerome" wrote in message
oups.com...
hey everyone

I was just wondering if you could please answer 2 simple questions I
have...

1) What is the code to put text into a cell? eg, what code would I add
to a comand button to make cell A1 say "hello"?

2) And, If i have a userform with two option buttons, then when I start
the program, the first option button is automatically selected. Is
there a code so that both buttons remain "unselected"?

Thanks so much, Jerome



  #3   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 137
Default two questions


Salut Jerome,

1. The code to input text would be :

Range("A1").Value = "Hello"

2. If option buttons are grouped, they become mutually exclusive ...

HTH
Bonne Chance

  #4   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 74
Default two questions

Jerome,

1)

Range("A1")="hello" would do it.
Cells(1,1)="hello" would be a little more swish

2)

Check the 'Value' of the option button that is checked in the Properties
window in VBA - change it to False.

Regards,

Chris.

--
Chris Marlow
MCSD.NET, Microsoft Office XP Master


"Jerome" wrote:

hey everyone

I was just wondering if you could please answer 2 simple questions I
have...

1) What is the code to put text into a cell? eg, what code would I add
to a comand button to make cell A1 say "hello"?

2) And, If i have a userform with two option buttons, then when I start
the program, the first option button is automatically selected. Is
there a code so that both buttons remain "unselected"?

Thanks so much, Jerome


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
Answers to questions posing more questions in a workbook sbelle1 Excel Worksheet Functions 2 August 8th 09 01:02 AM
View Questions and Answer to questions I created Roibn Taylor Excel Discussion (Misc queries) 4 July 24th 08 12:05 AM
2 questions about IF yairl Excel Worksheet Functions 2 May 30th 06 09:58 PM
Two Questions? Josh Sale Excel Programming 1 December 10th 04 11:18 PM
two... two... two questions in one! Frank Kabel Excel Programming 8 February 8th 04 04:09 AM


All times are GMT +1. The time now is 02:44 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"