ExcelBanter

ExcelBanter (https://www.excelbanter.com/)
-   Excel Programming (https://www.excelbanter.com/excel-programming/)
-   -   Macro Help (https://www.excelbanter.com/excel-programming/305335-macro-help.html)

old123

Macro Help
 
In Excel 2002, I have a template that calculates total footage of a uni
of lumber. In that template, after user enters the required data,
have a macro that is attached to a button that prints the page. What
want to have this macro to do is to ask the question "Do you wish t
enter another tally? (Y/N)" - if the answer is "Y" or "y", clear th
entered data, go to the first cell that requires data entry, then end.
If the answer is "N" or "n", close the worksheet.

I have done this in Lotus/123 using the GETLABEL and BRANCH macr
commands, but I can't find/can't see or am just not understanding ho
to do this in Excel. Any help and guidance would be appreciated!!

--
Message posted from http://www.ExcelForum.com


No Name

Macro Help
 
it might help if we could see your template
-----Original Message-----
In Excel 2002, I have a template that calculates total

footage of a unit
of lumber. In that template, after user enters the

required data, I
have a macro that is attached to a button that prints the

page. What I
want to have this macro to do is to ask the question "Do

you wish to
enter another tally? (Y/N)" - if the answer is "Y"

or "y", clear the
entered data, go to the first cell that requires data

entry, then end.
If the answer is "N" or "n", close the worksheet.

I have done this in Lotus/123 using the GETLABEL and

BRANCH macro
commands, but I can't find/can't see or am just not

understanding how
to do this in Excel. Any help and guidance would be

appreciated!!!


---
Message posted from http://www.ExcelForum.com/

.


Jim Rech

Macro Help
 
This may get you started:

Sub Test()
If MsgBox("Do you wish to enter another tally?", _
vbQuestion + vbYesNo) = vbYes Then
Range("A1,A3,A10").ClearContents
Range("A1").Select
Else
ActiveWorkbook.Close False
End If
End Sub


--
Jim Rech
Excel MVP
"old123 " wrote in message
...
| In Excel 2002, I have a template that calculates total footage of a unit
| of lumber. In that template, after user enters the required data, I
| have a macro that is attached to a button that prints the page. What I
| want to have this macro to do is to ask the question "Do you wish to
| enter another tally? (Y/N)" - if the answer is "Y" or "y", clear the
| entered data, go to the first cell that requires data entry, then end.
| If the answer is "N" or "n", close the worksheet.
|
| I have done this in Lotus/123 using the GETLABEL and BRANCH macro
| commands, but I can't find/can't see or am just not understanding how
| to do this in Excel. Any help and guidance would be appreciated!!!
|
|
| ---
| Message posted from http://www.ExcelForum.com/
|



old123[_2_]

Macro Help
 
Attached is the file/template. I want to add the code to the end of th
PRNT macro - to be attached to a PRINT button.

FYI: MACRO1 is an auto-open macro

On a "Y" or "y" answer to "Do you wish to enter another tally? (Y/N)
question, I would like clear entered counts (data field) in th
worksheet, then continue macro execution at MACRO1. If the answer i
"N", macro execution ends.

Thanks for your interest!

Attachment filename: !!mldgfintly custom.xls
Download attachment: http://www.excelforum.com/attachment.php?postid=63128
--
Message posted from http://www.ExcelForum.com


old123[_3_]

Macro Help
 
That's a BIG help!!! Thanks for pointing me in the right direction!!:

--
Message posted from http://www.ExcelForum.com



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

Powered by vBulletin® Copyright ©2000 - 2025, Jelsoft Enterprises Ltd.
ExcelBanter.com