#1   Report Post  
Posted to microsoft.public.excel.misc
external usenet poster
 
Posts: 51
Default Message box question

I have a time sheet, the first six columns are headed as follows:

Hours Hours worked for company
Start time End time A B C D
18:00 03:00 09:00
18:00 03:00 09:00

Having inserted the Start and End times, I need a message box to pop up and
ask "which company to bill" and which ever is selected (by a option button)
the total would be inserted on the correct cell of the row your working on.

--
WH99
  #2   Report Post  
Posted to microsoft.public.excel.misc
external usenet poster
 
Posts: 527
Default Message box question

Why not try data Validation, assuming that you have a list of customers in
the sheet. Debra Dalgleish has great articles on Datathis subject. Start with:
http://www.contextures.com/xlDataVal01.html

Peter

"WH99" wrote:

I have a time sheet, the first six columns are headed as follows:

Hours Hours worked for company
Start time End time A B C D
18:00 03:00 09:00
18:00 03:00 09:00

Having inserted the Start and End times, I need a message box to pop up and
ask "which company to bill" and which ever is selected (by a option button)
the total would be inserted on the correct cell of the row your working on.

--
WH99

  #3   Report Post  
Posted to microsoft.public.excel.misc
external usenet poster
 
Posts: 51
Default Message box question

Thanks Billy,
But I was after a vb code as I am using UserForms for this.
--
WH99


"Billy Liddel" wrote:

Why not try data Validation, assuming that you have a list of customers in
the sheet. Debra Dalgleish has great articles on Datathis subject. Start with:
http://www.contextures.com/xlDataVal01.html

Peter

"WH99" wrote:

I have a time sheet, the first six columns are headed as follows:

Hours Hours worked for company
Start time End time A B C D
18:00 03:00 09:00
18:00 03:00 09:00

Having inserted the Start and End times, I need a message box to pop up and
ask "which company to bill" and which ever is selected (by a option button)
the total would be inserted on the correct cell of the row your working on.

--
WH99

  #4   Report Post  
Posted to microsoft.public.excel.misc
external usenet poster
 
Posts: 527
Default Message box question

The idea is to add the option button to the form:
Set the Caption to "Which Company to Bill" and the Tab Index to zero.

Set the the first option caption Co X, Name Opt X, TAb index 0.
Repeat for each company

The code goes in the Click button on the form.

Private Sub OKButton_Click()
' make sure the correct sheet is active
sheets("Sheet1").activate
' Determine the next empty row
NextRow =application.worksheetfunction.Counta(Range("A:A") )+1
' Transfer the rest of your data then

If OptX then cells(nextrow, Column) = "X"
if OptY then Cells(nextrow, Column) = "Y"
if OptZ then Cells(nextrow,Column)= "Z"

'clear the controls for next entry
' Your code to clear other text boxes then

OPtionUnkown = True
firstTextBox.setfocus ' I think it was StartTime

End Sub

Can you work with this?

Peter

"WH99" wrote:

Thanks Billy,
But I was after a vb code as I am using UserForms for this.
--
WH99


"Billy Liddel" wrote:

Why not try data Validation, assuming that you have a list of customers in
the sheet. Debra Dalgleish has great articles on Datathis subject. Start with:
http://www.contextures.com/xlDataVal01.html

Peter

"WH99" wrote:

I have a time sheet, the first six columns are headed as follows:

Hours Hours worked for company
Start time End time A B C D
18:00 03:00 09:00
18:00 03:00 09:00

Having inserted the Start and End times, I need a message box to pop up and
ask "which company to bill" and which ever is selected (by a option button)
the total would be inserted on the correct cell of the row your working on.

--
WH99

  #5   Report Post  
Posted to microsoft.public.excel.misc
external usenet poster
 
Posts: 527
Default Message box question

I meant to say that Column is the column number that you want the company to
go, I guess 4 is appropriate?

Peter

"Billy Liddel" wrote:

The idea is to add the option button to the form:
Set the Caption to "Which Company to Bill" and the Tab Index to zero.

Set the the first option caption Co X, Name Opt X, TAb index 0.
Repeat for each company

The code goes in the Click button on the form.

Private Sub OKButton_Click()
' make sure the correct sheet is active
sheets("Sheet1").activate
' Determine the next empty row
NextRow =application.worksheetfunction.Counta(Range("A:A") )+1
' Transfer the rest of your data then

If OptX then cells(nextrow, Column) = "X"
if OptY then Cells(nextrow, Column) = "Y"
if OptZ then Cells(nextrow,Column)= "Z"

'clear the controls for next entry
' Your code to clear other text boxes then

OPtionUnkown = True
firstTextBox.setfocus ' I think it was StartTime

End Sub

Can you work with this?

Peter

"WH99" wrote:

Thanks Billy,
But I was after a vb code as I am using UserForms for this.
--
WH99


"Billy Liddel" wrote:

Why not try data Validation, assuming that you have a list of customers in
the sheet. Debra Dalgleish has great articles on Datathis subject. Start with:
http://www.contextures.com/xlDataVal01.html

Peter

"WH99" wrote:

I have a time sheet, the first six columns are headed as follows:

Hours Hours worked for company
Start time End time A B C D
18:00 03:00 09:00
18:00 03:00 09:00

Having inserted the Start and End times, I need a message box to pop up and
ask "which company to bill" and which ever is selected (by a option button)
the total would be inserted on the correct cell of the row your working on.

--
WH99



  #6   Report Post  
Posted to microsoft.public.excel.misc
external usenet poster
 
Posts: 51
Default Message box question

Thanks Billy,
At the moment it looks good.
Many thanks
--
WH99


"Billy Liddel" wrote:

I meant to say that Column is the column number that you want the company to
go, I guess 4 is appropriate?

Peter

"Billy Liddel" wrote:

The idea is to add the option button to the form:
Set the Caption to "Which Company to Bill" and the Tab Index to zero.

Set the the first option caption Co X, Name Opt X, TAb index 0.
Repeat for each company

The code goes in the Click button on the form.

Private Sub OKButton_Click()
' make sure the correct sheet is active
sheets("Sheet1").activate
' Determine the next empty row
NextRow =application.worksheetfunction.Counta(Range("A:A") )+1
' Transfer the rest of your data then

If OptX then cells(nextrow, Column) = "X"
if OptY then Cells(nextrow, Column) = "Y"
if OptZ then Cells(nextrow,Column)= "Z"

'clear the controls for next entry
' Your code to clear other text boxes then

OPtionUnkown = True
firstTextBox.setfocus ' I think it was StartTime

End Sub

Can you work with this?

Peter

"WH99" wrote:

Thanks Billy,
But I was after a vb code as I am using UserForms for this.
--
WH99


"Billy Liddel" wrote:

Why not try data Validation, assuming that you have a list of customers in
the sheet. Debra Dalgleish has great articles on Datathis subject. Start with:
http://www.contextures.com/xlDataVal01.html

Peter

"WH99" wrote:

I have a time sheet, the first six columns are headed as follows:

Hours Hours worked for company
Start time End time A B C D
18:00 03:00 09:00
18:00 03:00 09:00

Having inserted the Start and End times, I need a message box to pop up and
ask "which company to bill" and which ever is selected (by a option button)
the total would be inserted on the correct cell of the row your working on.

--
WH99

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
Message Box - Quick Question slow386 Excel Discussion (Misc queries) 2 April 30th 07 02:13 PM
Simple message box question zeyneddine Excel Discussion (Misc queries) 4 August 23rd 06 06:08 PM
Simple message box question zeyneddine Excel Discussion (Misc queries) 1 August 14th 06 08:23 PM
Newbie Question - Subtraction Formula Question [email protected] Excel Discussion (Misc queries) 3 May 5th 06 05:50 PM
changing the message in an error message The Villages DA Excel Worksheet Functions 2 February 18th 05 05:30 PM


All times are GMT +1. The time now is 09:29 AM.

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"