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

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   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 1
Default Excel Vba Clarification

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   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 1
Default Excel Vba Clarification

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   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 1
Default Excel Vba Clarification

sarasa

Why don't you make your form larger

--
Message posted from http://www.ExcelForum.com

  #5   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 1
Default Excel Vba Clarification

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
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
Excel-Category Axis-Question Clarification Eager1 Charts and Charting in Excel 0 February 5th 09 04:22 PM
Clarification pmayne181 Excel Discussion (Misc queries) 1 December 2nd 08 12:56 PM
If Then Statement Clarification Joanne Excel Discussion (Misc queries) 3 January 30th 06 09:26 PM
Clarification: using excel to send data to ethernet device over TCP/IP D. Miller[_2_] Excel Programming 0 April 27th 04 02:52 PM
Clarification please... JMay Excel Programming 9 April 24th 04 05:55 PM


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

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"