Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 10
Default Pop Up Window

Is it possible to open a spreadsheet where a pop up comes
up first? Here's what I'm thinking.

I have a timecard workbook that has a tab for 2004-2050.
When the user opens a spreadsheet in the workbook for the
first time (like the beginning of the year) I would like
a pop up window to come up and ask the user to enter his
regulart start time and total number of hours in his
regular work week. So as long as cell A1 is blank the
pop up should keep coming up. Once cell A1 is filled in
(first day of work in new year) the pop up should go
away. How do I do this?

Better yet. How can I make a form that the user enters
his start time, lunch in, lunch out, and end time that
will route the times as they are entered to a
spreadsheet. This would effectively have Excel working
as a Database.

Thanks for the ideas,

Matt
  #2   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 3,885
Default Pop Up Window

Hi
answers see below:

Powlaz wrote:
Is it possible to open a spreadsheet where a pop up comes
up first? Here's what I'm thinking.

Yes, you can use the workbook_open event. Put the following code in
your workbook module (no error checking, etc included - just to give
you an idea):
Private Sub Workbook_Open()
Dim input_value
If Range("A1").Value = "" Then
input_value = InputBox("Enter your data")
Range("A1").Value = input_value
End If
End Sub


Better yet. How can I make a form that the user enters
his start time, lunch in, lunch out, and end time that
will route the times as they are entered to a
spreadsheet. This would effectively have Excel working
as a Database.

If you have created a worksheet with these headings you could use the
inbuild data mask (goto 'Data - Mask'). Maybe this is sufficient for
your requirements

Frank




  #3   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 11,272
Default Pop Up Window

Matt,

You should address the range in Frank's solution via its worksheet, in case
the workbook is ever saved with a different worksheet active, that is

Private Sub Workbook_Open()
Dim input_value
With Worksheets("Sheet1").Range("A1")
If .Value = "" Then
input_value = InputBox("Enter your data")
.Value = input_value
End If
End With
End Sub

Also, I don't know what the Data - Mask that Frank refers to is, might be a
2003 feature or some odd German function <vbg, but you could use the
DataForm functionality.Build a database, column headings, and then you have
built-in form-handling functionality. Better still, use John Walkenbach's
enhanced Data Form addin, available free at
http://j-walk.com/ss/dataform/index.htm

--

HTH

Bob Phillips
... looking out across Poole Harbour to the Purbecks
(remove nothere from the email address if mailing direct)

"Frank Kabel" wrote in message
...
Hi
answers see below:

Powlaz wrote:
Is it possible to open a spreadsheet where a pop up comes
up first? Here's what I'm thinking.

Yes, you can use the workbook_open event. Put the following code in
your workbook module (no error checking, etc included - just to give
you an idea):
Private Sub Workbook_Open()
Dim input_value
If Range("A1").Value = "" Then
input_value = InputBox("Enter your data")
Range("A1").Value = input_value
End If
End Sub


Better yet. How can I make a form that the user enters
his start time, lunch in, lunch out, and end time that
will route the times as they are entered to a
spreadsheet. This would effectively have Excel working
as a Database.

If you have created a worksheet with these headings you could use the
inbuild data mask (goto 'Data - Mask'). Maybe this is sufficient for
your requirements

Frank






  #4   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 3,885
Default Pop Up Window

Hi Bob

You should address the range in Frank's solution via its worksheet,
in case the workbook is ever saved with a different worksheet active,
that is

Good point, I was just a little bit lazy on this part, thanks for
adding this :-)

Also, I don't know what the Data - Mask that Frank refers to is,
might be a 2003 feature or some odd German function <vbg,

O.K.You've got me - I stumbled on the translation :-)
Change 'Mask' to 'Form'. I agree with Bob's suggestion to use John
Walkenbach's add-in.

Best regards
Frank





  #5   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 92
Default Pop Up Window

Frank,

You are rockin' and rollin' today with my answers. Thank
you VERY much. Got another question about this one. I
may just use the built in Data Mask or (is it Data
Form) but how do I get it to load with the page. I don't
want to have to draw it out of the Data menu. Is that
possible?
I'm going to need to brush up on my VB code because I
like the idea of using the pop up window but I don't
remember how to assign the data from the input boxes
(Time In, Lunch In, Lunch Out, Time Out) to 4 different
cells.
Aside from that I have the spreadsheet configured so that
if b4:b35 have "H","S","V" in them then c4:f4(down to
c35:f35) shouldn't take input from the user.
It's getting to where the whole workbook ought to be
coded but I've been trying to do as much as I can with
simple Excel tools.

Thanks again for the help,

Matt

PS (check out my Checkboxes post. Any ideas there?)
-----Original Message-----
Hi
answers see below:

Powlaz wrote:
Is it possible to open a spreadsheet where a pop up

comes
up first? Here's what I'm thinking.

Yes, you can use the workbook_open event. Put the

following code in
your workbook module (no error checking, etc included -

just to give
you an idea):
Private Sub Workbook_Open()
Dim input_value
If Range("A1").Value = "" Then
input_value = InputBox("Enter your data")
Range("A1").Value = input_value
End If
End Sub


Better yet. How can I make a form that the user enters
his start time, lunch in, lunch out, and end time that
will route the times as they are entered to a
spreadsheet. This would effectively have Excel working
as a Database.

If you have created a worksheet with these headings you

could use the
inbuild data mask (goto 'Data - Mask'). Maybe this is

sufficient for
your requirements

Frank




.



  #6   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 3,885
Default Pop Up Window

Hi Matt

You are rockin' and rollin' today with my answers. Thank
you VERY much. Got another question about this one. I
may just use the built in Data Mask or (is it Data
Form) but how do I get it to load with the page. I don't
want to have to draw it out of the Data menu. Is that
possible?


for invoking the data form automatically you can put the following code
in the workbook module of your workbook. You can get this by yourself
by just recording your steps with the macro recorder - as I did :-)
Private Sub Workbook_Open()
Worksheets("Sheet1").Activate
Range("A1").Select
ActiveSheet.ShowDataForm
End Sub

If your data is in sheet1, starting in A1. If your data is ordered in
columns (lets say A:D) your data is automatically put in the right
cells.
Matt wrote:

Aside from that I have the spreadsheet configured so that
if b4:b35 have "H","S","V" in them then c4:f4(down to
c35:f35) shouldn't take input from the user.

see your other post

Frank

  #7   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 2,979
Default Pop Up Window

Note that this will fail unless the database starts in the range A1:B2
or is named "Database"

XL2000: ShowDataForm Method Fails if Data Cannot Be Found
http://support.microsoft.com/default.aspx?id=213835

Frank Kabel wrote:
Hi Matt


You are rockin' and rollin' today with my answers. Thank
you VERY much. Got another question about this one. I
may just use the built in Data Mask or (is it Data
Form) but how do I get it to load with the page. I don't
want to have to draw it out of the Data menu. Is that
possible?



for invoking the data form automatically you can put the following code
in the workbook module of your workbook. You can get this by yourself
by just recording your steps with the macro recorder - as I did :-)
Private Sub Workbook_Open()
Worksheets("Sheet1").Activate
Range("A1").Select
ActiveSheet.ShowDataForm
End Sub

If your data is in sheet1, starting in A1. If your data is ordered in
columns (lets say A:D) your data is automatically put in the right
cells.
Matt wrote:


Aside from that I have the spreadsheet configured so that
if b4:b35 have "H","S","V" in them then c4:f4(down to
c35:f35) shouldn't take input from the user.


see your other post

Frank



--
Debra Dalgleish
Excel FAQ, Tips & Book List
http://www.contextures.com/tiptech.html

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
how to save a desired window size but hv window comeup fullsz by d smjm1982 Excel Discussion (Misc queries) 1 February 15th 08 11:10 AM
View cell contents as a pop-up window (similar to comments window) Oldersox Excel Worksheet Functions 1 February 6th 08 07:09 AM
Docking Project Explorer, Properties window and Code window in VBE jayray Setting up and Configuration of Excel 2 March 27th 07 04:42 PM
The window opens in a smaller window not full sized window. Rachael Excel Discussion (Misc queries) 0 November 7th 06 09:04 PM
How do I undo the Excel, Window Menu, New Window command OLDFANG Excel Discussion (Misc queries) 2 March 17th 06 05:31 PM


All times are GMT +1. The time now is 01:32 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"