BeforeSave Sub

P

Phil Hageman

I need a Sub preventing users from saving a workbook, when
on worksheet "Scorecard" certain cells (cell ranges with
percent values) are blank:
G26:I26 Customer Weight
AG26:AI26 L&G Weight
G44:I44, Financial Weight
AG44:AI44 Process Weight

Also need a message box directing the user to the blank
cell, saying which cells are blank: "A value greater than
zero is required for Customer Weight." If more than one
cell is blank, the message would include those cells too.

Where would I put the Code?

Thanks, Phil
 
B

Bob Phillips

Phil,

We have had this question in various forms on a number of occasions over the
past week, and have tried various answers.

I gave a response previously that checked those same cells on exiting the
sheet, including a workbook close code. Are you still have problems with
that, if so I offered to look at the workbook for you.

--

HTH

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

papou

Hi Phil
Put it in the
Private Sub Workbook_BeforeSave(ByVal SaveAsUI As Boolean, Cancel As
Boolean)
Available in the Thisworkbook events dropdown list
and use Cancel = True
whenever saving the workbook is forbidden

HTH
Regards
Pascal
 
P

Phil Hageman

Bob,
You're right, we have been knocking this around for a
while. Me not being a programmer contributes to the
problem too, however, I have purchased coding books and
try to work through things when code doesn't work - which
is the case here. I put your code in and encountered
errors messages for syntax, etc, which I could not
resolve. Further, when I posted continuing problems, I
couldn't get answers. I asked you for your e-mail
address, which you provided, but didn't send the file
because of other overarching (personal) events - time
mostly. If you will again give me your e-mail address, I
will sent the file. It is a 4.515M file.

As said before, Bob, I really appreciate your help and
patience. With this file (Company project), I have to
resolve two remaining issues. One - this auto save thing,
and two, the problem with the Control ListBox acting
spooky on the Scorecard worksheet. And, I have to get
these things fixed by Wed, 1/21/04. Anything you can do
is appreciated!

Thanks again, Phil
PS I will be away from computers Wed, Thu, and Fri. Will
resume this work on Saturday 1/17
 
B

Bob Phillips

Phil,

4,.515Mb is big, but I have broadband so it's okay.

Get it to me before you go, with as much detail as you think of, and I will
do what I can before your return on Saturday.

My email is address is bob . phillips @ tiscali . co . uk

without any of the spaces.

Look forward to it.

Regards

Bob
 
P

Phil Hageman

Bob, The file is on its' way.
-----Original Message-----
Phil,

4,.515Mb is big, but I have broadband so it's okay.

Get it to me before you go, with as much detail as you think of, and I will
do what I can before your return on Saturday.

My email is address is bob . phillips @ tiscali . co . uk

without any of the spaces.

Look forward to it.

Regards

Bob




.
 
B

Bob Phillips

Phil,

Have you sent it as I have yet to receive it?

It may be that it is too big for my ISP. Can you zip it?

Bob
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Similar Threads


Top