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

I have a spreadsheet that on opening for first time requires the input of
text (a venue) in one cell and the Date in another.

On opening, I'd like to be prompted to input the venue then prompted to
input the date.

Appreciate help.
  #2   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 1,298
Default Help Required

in the development environment (ALT+F11)
from the Project Explorer, right click the ThisWorkbook object and select
View Code
- in fact double clicking it opens its code window.
select 'Workbook' in th eobject list
Excel adds the _Open event

add the code and edit it appropriately


Private Sub Workbook_Open()
Worksheets("Sheet2").Range("A1") = InputBox("Please enter the date")
End Sub

"barrowhill" wrote:

I have a spreadsheet that on opening for first time requires the input of
text (a venue) in one cell and the Date in another.

On opening, I'd like to be prompted to input the venue then prompted to
input the date.

Appreciate help.

  #3   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 17
Default Help Required

Patrick,

Thanks. Not quite what I had in mind. Wanted a message box to appear into
which I'd input my text. On clicking "OK" this would then be written to the
cell (B2). I'd then be given another message box into which I'd input the
date. This would then be entered into cell E2 when "OK" clicked.


"Patrick Molloy" wrote:

in the development environment (ALT+F11)
from the Project Explorer, right click the ThisWorkbook object and select
View Code
- in fact double clicking it opens its code window.
select 'Workbook' in th eobject list
Excel adds the _Open event

add the code and edit it appropriately


Private Sub Workbook_Open()
Worksheets("Sheet2").Range("A1") = InputBox("Please enter the date")
End Sub

"barrowhill" wrote:

I have a spreadsheet that on opening for first time requires the input of
text (a venue) in one cell and the Date in another.

On opening, I'd like to be prompted to input the venue then prompted to
input the date.

Appreciate help.

  #4   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 5,934
Default Help Required

Except for the the cell being assigned to (you didn't tells us that in your
first posting, but you should be able to change that on your own) and the
fact that only one question was asked (you should be able to add the second
question easy enough by just duplication the first one), what about
Patrick's solution didn't work for you?

--
Rick (MVP - Excel)


"barrowhill" wrote in message
...
Patrick,

Thanks. Not quite what I had in mind. Wanted a message box to appear
into
which I'd input my text. On clicking "OK" this would then be written to
the
cell (B2). I'd then be given another message box into which I'd input
the
date. This would then be entered into cell E2 when "OK" clicked.


"Patrick Molloy" wrote:

in the development environment (ALT+F11)
from the Project Explorer, right click the ThisWorkbook object and select
View Code
- in fact double clicking it opens its code window.
select 'Workbook' in th eobject list
Excel adds the _Open event

add the code and edit it appropriately


Private Sub Workbook_Open()
Worksheets("Sheet2").Range("A1") = InputBox("Please enter the date")
End Sub

"barrowhill" wrote:

I have a spreadsheet that on opening for first time requires the input
of
text (a venue) in one cell and the Date in another.

On opening, I'd like to be prompted to input the venue then prompted to
input the date.

Appreciate help.


  #5   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 5,934
Default Help Required

in the development environment (ALT+F11)
from the Project Explorer, right click the ThisWorkbook
object and select View Code
- in fact double clicking it opens its code window.


A short-cut for this procedure (assuming you are *not* using XL2007) is to
right-click the XL icon immediately to the left of the File menu item and
select View Code... the VB editor will open up and you will be placed
directly inside the code window for ThisWorkbook.

--
Rick (MVP - Excel)



  #6   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 5,934
Default Help Required

Except for the the cell being assigned to (you didn't tells us that in your
first posting, but you should be able to change that on your own) and the
fact that only one question was asked (you should be able to add the second
question easy enough by just duplication the first one), what about
Patrick's solution didn't work for you?

--
Rick (MVP - Excel)


"Patrick Molloy" wrote in message
...
in the development environment (ALT+F11)
from the Project Explorer, right click the ThisWorkbook object and select
View Code
- in fact double clicking it opens its code window.
select 'Workbook' in th eobject list
Excel adds the _Open event

add the code and edit it appropriately


Private Sub Workbook_Open()
Worksheets("Sheet2").Range("A1") = InputBox("Please enter the date")
End Sub

"barrowhill" wrote:

I have a spreadsheet that on opening for first time requires the input of
text (a venue) in one cell and the Date in another.

On opening, I'd like to be prompted to input the venue then prompted to
input the date.

Appreciate help.


  #7   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 5,934
Default Help Required

Sorry, I posted this to your message by mistake.

--
Rick (MVP - Excel)


"Rick Rothstein" wrote in message
...
Except for the the cell being assigned to (you didn't tells us that in
your first posting, but you should be able to change that on your own) and
the fact that only one question was asked (you should be able to add the
second question easy enough by just duplication the first one), what about
Patrick's solution didn't work for you?

--
Rick (MVP - Excel)


"Patrick Molloy" wrote in
message ...
in the development environment (ALT+F11)
from the Project Explorer, right click the ThisWorkbook object and select
View Code
- in fact double clicking it opens its code window.
select 'Workbook' in th eobject list
Excel adds the _Open event

add the code and edit it appropriately


Private Sub Workbook_Open()
Worksheets("Sheet2").Range("A1") = InputBox("Please enter the date")
End Sub

"barrowhill" wrote:

I have a spreadsheet that on opening for first time requires the input
of
text (a venue) in one cell and the Date in another.

On opening, I'd like to be prompted to input the venue then prompted to
input the date.

Appreciate help.



  #8   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 17
Default Help Required

Rickm

Should of said I was using Excel 2003.

In answer to your question, No and Yes !. I've added the main code line
with obviously changed parameters to and existing procedure.

On opening I don't get the input box requesting my text/date. Hence Answer
No.

If I run in debug mode and run to curser where curser is set after 'End Sub'
it works. Hence answer Yes.

Perplexed!?!

"Rick Rothstein" wrote:

Sorry, I posted this to your message by mistake.

--
Rick (MVP - Excel)


"Rick Rothstein" wrote in message
...
Except for the the cell being assigned to (you didn't tells us that in
your first posting, but you should be able to change that on your own) and
the fact that only one question was asked (you should be able to add the
second question easy enough by just duplication the first one), what about
Patrick's solution didn't work for you?

--
Rick (MVP - Excel)


"Patrick Molloy" wrote in
message ...
in the development environment (ALT+F11)
from the Project Explorer, right click the ThisWorkbook object and select
View Code
- in fact double clicking it opens its code window.
select 'Workbook' in th eobject list
Excel adds the _Open event

add the code and edit it appropriately


Private Sub Workbook_Open()
Worksheets("Sheet2").Range("A1") = InputBox("Please enter the date")
End Sub

"barrowhill" wrote:

I have a spreadsheet that on opening for first time requires the input
of
text (a venue) in one cell and the Date in another.

On opening, I'd like to be prompted to input the venue then prompted to
input the date.

Appreciate help.




  #9   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 5,934
Default Help Required

Do you perhaps have your security settings set to not run macros?

--
Rick (MVP - Excel)


"barrowhill" wrote in message
...
Rickm

Should of said I was using Excel 2003.

In answer to your question, No and Yes !. I've added the main code line
with obviously changed parameters to and existing procedure.

On opening I don't get the input box requesting my text/date. Hence
Answer
No.

If I run in debug mode and run to curser where curser is set after 'End
Sub'
it works. Hence answer Yes.

Perplexed!?!

"Rick Rothstein" wrote:

Sorry, I posted this to your message by mistake.

--
Rick (MVP - Excel)


"Rick Rothstein" wrote in message
...
Except for the the cell being assigned to (you didn't tells us that in
your first posting, but you should be able to change that on your own)
and
the fact that only one question was asked (you should be able to add
the
second question easy enough by just duplication the first one), what
about
Patrick's solution didn't work for you?

--
Rick (MVP - Excel)


"Patrick Molloy" wrote in
message ...
in the development environment (ALT+F11)
from the Project Explorer, right click the ThisWorkbook object and
select
View Code
- in fact double clicking it opens its code window.
select 'Workbook' in th eobject list
Excel adds the _Open event

add the code and edit it appropriately


Private Sub Workbook_Open()
Worksheets("Sheet2").Range("A1") = InputBox("Please enter the date")
End Sub

"barrowhill" wrote:

I have a spreadsheet that on opening for first time requires the
input
of
text (a venue) in one cell and the Date in another.

On opening, I'd like to be prompted to input the venue then prompted
to
input the date.

Appreciate help.




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
Help required .... [email protected] Excel Worksheet Functions 2 December 22nd 08 06:31 PM
VBA Help required...................! Thyagaraj Excel Programming 4 July 20th 06 02:42 PM
VBA Help required..........! Thyagaraj Excel Programming 1 July 1st 06 11:06 AM
Bit of help required. PaulOakley[_7_] Excel Programming 2 July 18th 05 07:20 PM
New to VBA - help required please. Neil Grantham Excel Programming 3 September 30th 03 01:56 PM


All times are GMT +1. The time now is 05:40 PM.

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"