Home |
Search |
Today's Posts |
|
#1
![]()
Posted to microsoft.public.excel.programming
|
|||
|
|||
![]()
Love this forum...you guys have helped me out so much. Here's another one,
but could not find an answer. I need to write a macro that will prompt the user to input a name, starting time, starting date, ending time, and ending date. Then take those inputs and insert them into a cell with other text in it. I need it to look something like this... Report on name starting at start time start date to end time end date. Thanks for any help. I really appreciate it, and my users will appreciate it even more. Erik |
#2
![]()
Posted to microsoft.public.excel.programming
|
|||
|
|||
![]()
Hi Erik
Don't. A series of input boxes doesn't show the whole set of entries and has no Back functionality. It is an awful user experience. Create a userform for this job: http://www.contextures.com/xlUserForm01.html HTH. Best wishes Harald "Erik" skrev i melding ... Love this forum...you guys have helped me out so much. Here's another one, but could not find an answer. I need to write a macro that will prompt the user to input a name, starting time, starting date, ending time, and ending date. Then take those inputs and insert them into a cell with other text in it. I need it to look something like this... Report on name starting at start time start date to end time end date. Thanks for any help. I really appreciate it, and my users will appreciate it even more. Erik |
#3
![]()
Posted to microsoft.public.excel.programming
|
|||
|
|||
![]()
Harold,
Understand the userform deal and will try to incorporate it on Monday when I go back to work. Will I be able to use this and have it insert the user inputs into a sentence like in my original post? Also, how do I get the userform to show up after(or before) I run the other macros to import data and format the spreadsheet? Thanks again Erik Erik "Harald Staff" wrote: Hi Erik Don't. A series of input boxes doesn't show the whole set of entries and has no Back functionality. It is an awful user experience. Create a userform for this job: http://www.contextures.com/xlUserForm01.html HTH. Best wishes Harald "Erik" skrev i melding ... Love this forum...you guys have helped me out so much. Here's another one, but could not find an answer. I need to write a macro that will prompt the user to input a name, starting time, starting date, ending time, and ending date. Then take those inputs and insert them into a cell with other text in it. I need it to look something like this... Report on name starting at start time start date to end time end date. Thanks for any help. I really appreciate it, and my users will appreciate it even more. Erik |
#4
![]()
Posted to microsoft.public.excel.programming
|
|||
|
|||
![]()
Yes to all, it'll work. Deal with "how" after reading and testing userforms.
Best wishes Harald "Erik" wrote in message ... Harold, Understand the userform deal and will try to incorporate it on Monday when I go back to work. Will I be able to use this and have it insert the user inputs into a sentence like in my original post? Also, how do I get the userform to show up after(or before) I run the other macros to import data and format the spreadsheet? Thanks again Erik Erik "Harald Staff" wrote: Hi Erik Don't. A series of input boxes doesn't show the whole set of entries and has no Back functionality. It is an awful user experience. Create a userform for this job: http://www.contextures.com/xlUserForm01.html HTH. Best wishes Harald "Erik" skrev i melding ... Love this forum...you guys have helped me out so much. Here's another one, but could not find an answer. I need to write a macro that will prompt the user to input a name, starting time, starting date, ending time, and ending date. Then take those inputs and insert them into a cell with other text in it. I need it to look something like this... Report on name starting at start time start date to end time end date. Thanks for any help. I really appreciate it, and my users will appreciate it even more. Erik |
#5
![]()
Posted to microsoft.public.excel.programming
|
|||
|
|||
![]()
Harald,
Ok, got the userform to work. Now I need to modify, just a bit and that is where I am getting stuck. Below is the code I have so far, but running into errors. Private Sub cmdAdd_Click() Dim ws As Worksheet Dim cty As String Dim sDate As String Dim eDate As String Set ws = Worksheets("Sheet1") Set cty = Me.txtCity.Value Set sDate = Me.txtStart.Value Set eDate = Me.txtEnd.Value 'goto cell A3 Range("A3").Select 'put the data to the database in the selected cells which will be merged ActiveCell.Range("A1:E1").Select ActiveCell.FormulaR1C1 = "SUBJ: Water usage in " & cty "from 12:00pm " &sDate& "to 11:59pm " &eDate& " See Ted for more information." With Selection .HorizontalAlignment = xlRight .VerticalAlignment = xlBottom .WrapText = True .ReadingOrder = xlContext .MergeCells = True End With Selection.Font.Bold = True 'clear the data Me.txtCity.Value = "" Me.txtStart.Value = "" Me.txtEnd.Value = "" Me.txtCity.SetFocus Unload Me End Sub Any help you can provide is appreciated. Thanks "Harald Staff" wrote: Yes to all, it'll work. Deal with "how" after reading and testing userforms. Best wishes Harald "Erik" wrote in message ... Harold, Understand the userform deal and will try to incorporate it on Monday when I go back to work. Will I be able to use this and have it insert the user inputs into a sentence like in my original post? Also, how do I get the userform to show up after(or before) I run the other macros to import data and format the spreadsheet? Thanks again Erik Erik "Harald Staff" wrote: Hi Erik Don't. A series of input boxes doesn't show the whole set of entries and has no Back functionality. It is an awful user experience. Create a userform for this job: http://www.contextures.com/xlUserForm01.html HTH. Best wishes Harald "Erik" skrev i melding ... Love this forum...you guys have helped me out so much. Here's another one, but could not find an answer. I need to write a macro that will prompt the user to input a name, starting time, starting date, ending time, and ending date. Then take those inputs and insert them into a cell with other text in it. I need it to look something like this... Report on name starting at start time start date to end time end date. Thanks for any help. I really appreciate it, and my users will appreciate it even more. Erik |
#6
![]()
Posted to microsoft.public.excel.programming
|
|||
|
|||
![]()
what are the errors & where are they occuring?
:) susan On Jan 26, 3:00*pm, Erik wrote: Harald, Ok, got the userform to work. *Now I need to modify, just a bit and that is where I am getting stuck. *Below is the code I have so far, but running into errors. Private Sub cmdAdd_Click() Dim ws As Worksheet Dim cty As String Dim sDate As String Dim eDate As String Set ws = Worksheets("Sheet1") Set cty = Me.txtCity.Value Set sDate = Me.txtStart.Value Set eDate = Me.txtEnd.Value 'goto cell A3 Range("A3").Select 'put the data to the database in the selected cells which will be merged ActiveCell.Range("A1:E1").Select ActiveCell.FormulaR1C1 = "SUBJ: Water usage in " & cty "from 12:00pm " &sDate& "to 11:59pm " &eDate& " See Ted for more information." With Selection * * .HorizontalAlignment = xlRight * * .VerticalAlignment = xlBottom * * .WrapText = True * * .ReadingOrder = xlContext * * .MergeCells = True End With Selection.Font.Bold = True 'clear the data Me.txtCity.Value = "" Me.txtStart.Value = "" Me.txtEnd.Value = "" Me.txtCity.SetFocus Unload Me End Sub Any help you can provide is appreciated. *Thanks "Harald Staff" wrote: Yes to all, it'll work. Deal with "how" after reading and testing userforms. Best wishes Harald "Erik" wrote in message ... Harold, Understand the userform deal and will try to incorporate it on Monday when I go back to work. Will I be able to use this and have it insert the user inputs into a sentence like in my original post? Also, how do I get the userform to show up after(or before) I run the other macros to import data and format the spreadsheet? Thanks again Erik Erik "Harald Staff" wrote: Hi Erik Don't. A series of input boxes doesn't show the whole set of entries and has no Back functionality. It is an awful user experience. Create a userform for this job: http://www.contextures.com/xlUserForm01.html HTH. Best wishes Harald "Erik" skrev i melding ... Love this forum...you guys have helped me out so much. *Here's another one, but could not find an answer. I need to write a macro that will prompt the user to input a name, starting time, starting date, ending time, and ending date. *Then take those inputs and insert them into a cell with other text in it. *I need it to look something like this... Report on name starting at start time start date to end time end date. Thanks for any help. *I really appreciate it, and my users will appreciate it even more. Erik- Hide quoted text - - Show quoted text - |
Reply |
Thread Tools | Search this Thread |
Display Modes | |
|
|
![]() |
||||
Thread | Forum | |||
Forcing User inputs | Excel Discussion (Misc queries) | |||
Locking Cells when user inputs data | Excel Discussion (Misc queries) | |||
User Forms & Checking Inputs | Excel Programming | |||
Extend Border As User Inputs New Rows | Excel Discussion (Misc queries) | |||
Text Box : Controlling what the user inputs | Excel Programming |