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

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

  #2   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 11,272
Default BeforeSave Sub

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)

"Phil Hageman" wrote in message
...
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



  #3   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 41
Default BeforeSave Sub

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


"Phil Hageman" a écrit dans le message
de ...
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



  #4   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 160
Default BeforeSave Sub

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

-----Original Message-----
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)

"Phil Hageman"

wrote in message
...
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



.

  #5   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 11,272
Default BeforeSave Sub

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

"Phil Hageman" wrote in message
...
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





  #6   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 160
Default BeforeSave Sub

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

"Phil Hageman"

wrote in message
...
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



.

  #7   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 11,272
Default BeforeSave Sub

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

"Phil Hageman" wrote in message
...
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



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
Event (BeforeSave) - How to test VBA code? Dave P. can you hear me now? EagleOne Excel Discussion (Misc queries) 3 September 14th 06 07:46 PM
BeforeSave event Carl Bowman Excel Discussion (Misc queries) 4 February 6th 05 12:28 PM
VBA - BeforeSave - NEED HELP HRobertson Excel Programming 2 October 23rd 03 06:50 PM


All times are GMT +1. The time now is 02:12 AM.

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"