Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 247
Default userform and inputboxes

im new to userfroms and please need help with the following code.
all that i done so far is to right click and insert user form and add
label1
textbox1
textbox2
textbox3
commandbutton1


label1 needs to display info from sheet1 range c & d & e

textbox1 contains a brief description and goes in sheet 1 colum c down(find
next open cell downwards)

textbox2 contains a date and goes next open cell down in sheet1 colum d

textbox3 contains a date and goes next open cell down in sheet1 colum e

commandbutton1 = save/ok (puts the data enterd in the three textboxes in the
correct range

we got a number of specials runing at once but they dont all start or end on
the same day. now i need this userform to pop up when the workbook are
opened
and tell the user what specials are currently running and when it started and
when its going to end.

on sheet1 it self (called "sheet1") i need the discription in column c
down and column d will be the start date and column e the end date. and if
possible if the system can see when it ends and the day after it end delete
the entry.

  #2   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 220
Default userform and inputboxes

I'd suggest you check out one of John Walkenbach's books if you want
to learn Excel but this should get you started:

Put this code in 'ThisWorkbook' to display the userform when the
workbook opens:
Private Sub Workbook_Open()
UserForm1.Show Modless
End Sub

Then put this code in your userform:
Private Sub CommandButton1_Click()
Dim lRow As Long, i As Integer
For i = 3 To 5
lRow = Cells(Rows.Count, i).End(xlUp).Row
Cells(lRow + 1, i) = Me.Controls("TextBox" & i - 2).Value
Next i
End Sub

--
Dan

On Jan 3, 2:43*am, pswanie wrote:
im new to userfroms and please need help with the following code.
all that i done so far is to right click and insert user form and add
label1
textbox1
textbox2
textbox3
commandbutton1

label1 needs to display info from sheet1 range c & d & e

textbox1 contains a brief description and goes in sheet 1 colum c down(find
next open cell downwards)

textbox2 contains a date and goes next open cell down in sheet1 colum d

textbox3 contains a date and goes next open cell down in sheet1 colum e

commandbutton1 = save/ok (puts the data enterd in the three textboxes in the
correct range

we got a number of specials runing at once but they dont all start or end on
the same day. *now i need this userform to pop up when the workbook are
opened
and tell the user what specials are currently running and when it started and
when its going to end.

on sheet1 it self (called "sheet1") i need the discription in column c
down and column d will be the start date and column e the end date. and if
possible if the system can see when it ends and the day after it end delete
the entry.

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
Positioning Userforms, InputBoxes Pflugs Excel Discussion (Misc queries) 1 July 10th 07 06:12 PM
Is there an easy Copy/Paste of a Userform ? (Entire Userform Including tx & cbx's) Corey Excel Programming 2 January 9th 07 01:01 PM
connecting 2 inputboxes and using the autofill Mike Excel Programming 4 September 29th 06 12:37 PM
InputBoxes Sean Excel Programming 2 July 19th 06 06:09 PM
InputBoxes Exceptions ianripping[_42_] Excel Programming 3 April 8th 04 09:34 PM


All times are GMT +1. The time now is 06:30 PM.

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"