Re: Make adding a footer optional with message box

Tech Tip: Click here to run a free scan for Windows Errors and optimize PC performance



First, it's better to keep all posting in the newsgroups.  That way anyone can
help.

Second, I didn't see a reply to this message:

http://groups.google.co.uk/group/microsoft.public.excel.programming/browse_frm/thread/651510cdc00aa5b/e03ee460d62b94ad?lnk=st&q=group%3A*excel*+insubject%3A%22Make+insubject%3Aa+insubject%3Amacro+insubject%3Aavailiable+insubject%3Ato+insubject%3Aall+insubject%3Aworkbooks%22&rnum=1&hl=en#e03ee460d62b94ad

or

http://snipurl.com/m4cc

Third, you can always use Google to search for previous messages (and
responses):
http://groups.google.com/advanced_group_search


"Ernest L. Lippert" wrote:
> 
> Dave,
> I saw your reply on 1/31/06. I think there was an earlier one that referred
> me to Walkenbach. That message got deleted by mistake. I did reply to it
> directly to your email address but that message was rejected somewhere along
> the line. In any event, your first reply did not solve my problem.
> Thanks,
> Ernie
> 
> "Dave Peterson" <petersod@xxxxxxxxxxxxxxxx> wrote in message
> news:43DFF5EA.BA9B4428@xxxxxxxxxxxxxxxxxxx
> > You reply in the newsgroups.  That way anyone can add to the discussion.
> >
> > I  meant that I replied earlier today.  Did you see that post?
> >
> > "Ernest L. Lippert" wrote:
> >>
> >> Dave,
> >> Thanks. I did receive your reply; however, it did not fully answer my
> >> question so I tried another post in a different way. Compound that with
> >> the
> >> fact that this is my first use of a user group and I am feeling my way
> >> around on the mechanics of the process. Do I reply to you at your address
> >> ( replies to you at ...XSPAM.net came back undeliverable) or do I reply
> >> to
> >> the newsgroup? This time I will try to send it to the newsgroup. I
> >> appreciate your advice on the proper procedure.
> >> Regards,
> >> Ernie
> >> ernielippert@xxxxxxxxx
> >> ********************The error message received is*******************
> >> Your message has encountered delivery problems
> >> to the following recipient(s):
> >>
> >> petersod@xxxxxxxxxxxxxxxx
> >> (Was addressed to petersod@xxxxxxxxxxxxxxxx)
> >> Delivery failed
> >>
> >> Can't interpret host name, or non-existant host (WS-Error: 11001)
> >> **************************************************************
> >>
> >> "Dave Peterson" <petersod@xxxxxxxxxxxxxxxx> wrote in message
> >> news:43DF8EBE.99B9EAAB@xxxxxxxxxxxxxxxxxxx
> >> > You have a reply to your earlier post.
> >> >
> >> > "Ernest L. Lippert" wrote:
> >> >>
> >> >> In my particular application I want our bookkeeper to be prompted to
> >> >> make
> >> >> a
> >> >> conscious decision  to add a footer or not. Following Walkenbach's
> >> >> lead
> >> >> on
> >> >> p. 539 of his Power
> >> >> Programming with VBA book, I tried the code below as a class module in
> >> >> Personal.xls but I couldn't get it to work for all workbooks. It only
> >> >> works
> >> >> if I manually insert the code in each workbook. In the properties pane
> >> >> for
> >> >> Personal.xls under Instancing the dropdown box said
> >> >> "2-PublicNotCreatable".
> >> >> Any ideas about what is wrong? I tried the first line of code with
> >> >> Excel.Application or Application with no luck.
> >> >>
> >> >> Do I have to make this an Add-In?
> >> >>
> >> >> Regards,
> >> >> Ernie
> >> >>
> >> >> --------------------------------------------------------------------
> >> >> Public WithEvents AppEvents As Excel.Application
> >> >> Private Sub AppEvents_Workbook_BeforePrint(Cancel As Boolean)
> >> >>     Call ErnieAddPath
> >> >> End Sub
> >> >> Private Sub ErnieAddPath()
> >> >>     Ans = MsgBox("Add path to footer?", vbYesNo + vbQuestion, "Tell
> >> >> Me")
> >> >>     If Ans = vbNo Then
> >> >>     Active***.PageSetup.LeftFooter = ""
> >> >>     Else: For Each sht In ThisWorkbook.Sheets
> >> >>         sht.PageSetup.LeftFooter = "&8" & LCase(ThisWorkbook.FullName)
> >> >>     Next sht
> >> >>     End If
> >> >> End Sub
> >> >
> >> > --
> >> >
> >> > Dave Peterson
> >
> > --
> >
> > Dave Peterson

-- 

Dave Peterson
.


Quantcast