Home |
Search |
Today's Posts |
|
#1
![]()
Posted to microsoft.public.excel.programming
|
|||
|
|||
![]()
i AM ATTACHING THE EXCEL SHEET HERE WITH MACRO. THE CODE IS NOT WORKIN
IN THAT EXCEL SHEE. COULD ANYONE HLPE ME IN THA Attachment filename: harini_work 5.xls Download attachment: http://www.excelforum.com/attachment.php?postid=58212 -- Message posted from http://www.ExcelForum.com |
#2
![]()
Posted to microsoft.public.excel.programming
|
|||
|
|||
![]()
sarasa
Here is my version of your primary code. It should not over typ previous record. Copy this to your pgm to see if it works for you. Be sure you backup your pgm before you try. Charles Private Sub CommandButton1_Click() Application.ScreenUpdating = False Dim LastRow As Range Set LastRow = Sheet1.Range("b65536").End(xlUp) With UserForm1 If OptionButton1.Value = True Then LastRow.Offset(1, 0).Value = "Question 1. " OptionButton1.Caption ElseIf OptionButton2.Value = True Then LastRow.Offset(1, 0).Value = "Question 1. " OptionButton2.Caption ElseIf OptionButton3.Value = True Then LastRow.Offset(1, 0).Value = "Question 1. " OptionButton3.Caption End If If OptionButton4.Value = True Then LastRow.Offset(2, 0).Value = "Question 2. " OptionButton4.Caption ElseIf OptionButton5.Value = True Then LastRow.Offset(2, 0).Value = "Question 2. " OptionButton5.Caption ElseIf OptionButton6.Value = True Then LastRow.Offset(2, 0).Value = "Question 2. " OptionButton6.Caption End If If OptionButton7.Value = True Then LastRow.Offset(3, 0).Value = "Question 3. " OptionButton7.Caption ElseIf OptionButton8.Value = True Then LastRow.Offset(3, 0).Value = "Question 3. " OptionButton8.Caption ElseIf OptionButton9.Value = True Then LastRow.Offset(3, 0).Value = "Question 3. " OptionButton9.Caption ElseIf OptionButton10.Value = True Then LastRow.Offset(3, 0).Value = "Question 3. " OptionButton10.Caption ElseIf OptionButton11.Value = True Then LastRow.Offset(3, 0).Value = "Question 3. Other" LastRow.Offset(3, 2).Value = TextBox1.Text & " Months" End If If OptionButton11.Value = False Then LastRow.Offset(3, 3).Value = " " End If With LastRow .Offset(4, 0).Value = "Question 4. " & TextBox2.Text .Offset(4, 1).Value = "Physician: " .Offset(4, 2).Value = " " & TextBox2.Text .Offset(5, 1).Value = " NP/RN: " .Offset(5, 2).Value = " " & TextBox3.Text .Offset(6, 1).Value = " Other: " .Offset(6, 2).Value = " " & TextBox4.Text .Offset(7, 1).Value = " Total: " .Offset(7, 2).Value = " " & TextBox5.Text .Offset(4, 3).Value = " Salary: " .Offset(4, 4).Value = " " & TextBox6.Text .Offset(5, 3).Value = "Operational: " .Offset(5, 4).Value = " " & TextBox7.Text .Offset(6, 3).Value = " Capital: " .Offset(6, 4).Value = " " & TextBox8.Text .Offset(7, 3).Value = " Total: " .Offset(7, 4).Value = " " & TextBox9.Text .Offset(8, 0).Value = "Question 5. " & TextBox10.Text End With End With End Su -- Message posted from http://www.ExcelForum.com |
#3
![]()
Posted to microsoft.public.excel.programming
|
|||
|
|||
![]()
Dear Charles
It works perfectly your code. Thank you very much. Could you tellme ca i iinclude scroll bar., so that i can add two more qeustons in on form -- Message posted from http://www.ExcelForum.com |
#4
![]()
Posted to microsoft.public.excel.programming
|
|||
|
|||
![]() |
#5
![]()
Posted to microsoft.public.excel.programming
|
|||
|
|||
![]()
Hi Charles,
I did larger form. But when you run through macro it does not showup scrollbar. I did in form properties vertical scrollbar . though it is not show up. how can i see full for? Please explain to me or send email to me --- Message posted from http://www.ExcelForum.com/ |
Reply |
Thread Tools | Search this Thread |
Display Modes | |
|
|
![]() |
||||
Thread | Forum | |||
Excel-Category Axis-Question Clarification | Charts and Charting in Excel | |||
Clarification | Excel Discussion (Misc queries) | |||
If Then Statement Clarification | Excel Discussion (Misc queries) | |||
Clarification: using excel to send data to ethernet device over TCP/IP | Excel Programming | |||
Clarification please... | Excel Programming |