Home |
Search |
Today's Posts |
#1
Posted to microsoft.public.excel.programming
|
|||
|
|||
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
Posted to microsoft.public.excel.programming
|
|||
|
|||
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
Posted to microsoft.public.excel.programming
|
|||
|
|||
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
Posted to microsoft.public.excel.programming
|
|||
|
|||
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 |
Display Modes | |
|
|
Similar Threads | ||||
Thread | Forum | |||
Answers to questions posing more questions in a workbook | Excel Worksheet Functions | |||
View Questions and Answer to questions I created | Excel Discussion (Misc queries) | |||
2 questions about IF | Excel Worksheet Functions | |||
Two Questions? | Excel Programming | |||
two... two... two questions in one! | Excel Programming |