PC Review


Reply
Thread Tools Rate Thread

Blocking a Windows Message

 
 
GrantW
Guest
Posts: n/a
 
      18th Dec 2007
In an application that I am creating, one of the macros looks to see if
another workbook (from which data will be extracted) is Read Only. If it is
read only, control is passed to a msgbox advising the user to try again, then
the Sub ends. By the time the user clicks ok to the msgbox and tries to run
the macro again, the other workbook is usually not Read Only and everything
runs as it should.
However, Windows will send the user a msgbox shortly after, advising that
the other workbook is now free, and ask if they want to view it. Is there any
way to block that Windows advice from being sent?. It is screwing things up.
I appreciate any help you can provide.
 
Reply With Quote
 
 
 
 
Jim Rech
Guest
Posts: n/a
 
      18th Dec 2007
>>Windows will send the user a msgbox shortly after

It's Excel. Have a look at the Workbooks.Open method in VBE help,
specifically the Notify argument which controls whether the workbook
available prompt occurs.

--
Jim
"GrantW" <(E-Mail Removed)> wrote in message
news:C0073E14-628F-42A5-A3B2-(E-Mail Removed)...
| In an application that I am creating, one of the macros looks to see if
| another workbook (from which data will be extracted) is Read Only. If it
is
| read only, control is passed to a msgbox advising the user to try again,
then
| the Sub ends. By the time the user clicks ok to the msgbox and tries to
run
| the macro again, the other workbook is usually not Read Only and
everything
| runs as it should.
| However, Windows will send the user a msgbox shortly after, advising that
| the other workbook is now free, and ask if they want to view it. Is there
any
| way to block that Windows advice from being sent?. It is screwing things
up.
| I appreciate any help you can provide.


 
Reply With Quote
 
GrantW
Guest
Posts: n/a
 
      18th Dec 2007
Jim, Thanks for that tip.
Being very green at syntax I have tried to code it like this:

Workbooks.Open
("\\Caffeine\a3_personnel_management\NSR\Database\Dbase.xlsx",,,,,,,,,,False)

with false, so that no notification is sent, but I keep getting a compile
error asking for an expected expression.
What am I missing?

"Jim Rech" wrote:

> >>Windows will send the user a msgbox shortly after

>
> It's Excel. Have a look at the Workbooks.Open method in VBE help,
> specifically the Notify argument which controls whether the workbook
> available prompt occurs.
>
> --
> Jim
> "GrantW" <(E-Mail Removed)> wrote in message
> news:C0073E14-628F-42A5-A3B2-(E-Mail Removed)...
> | In an application that I am creating, one of the macros looks to see if
> | another workbook (from which data will be extracted) is Read Only. If it
> is
> | read only, control is passed to a msgbox advising the user to try again,
> then
> | the Sub ends. By the time the user clicks ok to the msgbox and tries to
> run
> | the macro again, the other workbook is usually not Read Only and
> everything
> | runs as it should.
> | However, Windows will send the user a msgbox shortly after, advising that
> | the other workbook is now free, and ask if they want to view it. Is there
> any
> | way to block that Windows advice from being sent?. It is screwing things
> up.
> | I appreciate any help you can provide.
>
>
>

 
Reply With Quote
 
Jim Rech
Guest
Posts: n/a
 
      19th Dec 2007
The only thing that might be wrong are the parens. Only use them if you are
receiving the returned value of the method. For example either:

Dim MyWB as Workbook
Set MyWB = Workbooks.Open("C:\abc.xls")

or

Workbooks.Open "C:\abc.xls"

It looks like you have parens but no "receiver".


--
Jim
"GrantW" <(E-Mail Removed)> wrote in message
news:FFC0BA00-F883-4AD3-BAD2-(E-Mail Removed)...
| Jim, Thanks for that tip.
| Being very green at syntax I have tried to code it like this:
|
| Workbooks.Open
|
("\\Caffeine\a3_personnel_management\NSR\Database\Dbase.xlsx",,,,,,,,,,False)
|
| with false, so that no notification is sent, but I keep getting a compile
| error asking for an expected expression.
| What am I missing?
|
| "Jim Rech" wrote:
|
| > >>Windows will send the user a msgbox shortly after
| >
| > It's Excel. Have a look at the Workbooks.Open method in VBE help,
| > specifically the Notify argument which controls whether the workbook
| > available prompt occurs.
| >
| > --
| > Jim
| > "GrantW" <(E-Mail Removed)> wrote in message
| > news:C0073E14-628F-42A5-A3B2-(E-Mail Removed)...
| > | In an application that I am creating, one of the macros looks to see
if
| > | another workbook (from which data will be extracted) is Read Only. If
it
| > is
| > | read only, control is passed to a msgbox advising the user to try
again,
| > then
| > | the Sub ends. By the time the user clicks ok to the msgbox and tries
to
| > run
| > | the macro again, the other workbook is usually not Read Only and
| > everything
| > | runs as it should.
| > | However, Windows will send the user a msgbox shortly after, advising
that
| > | the other workbook is now free, and ask if they want to view it. Is
there
| > any
| > | way to block that Windows advice from being sent?. It is screwing
things
| > up.
| > | I appreciate any help you can provide.
| >
| >
| >


 
Reply With Quote
 
 
 
Reply

Thread Tools
Rate This Thread
Rate This Thread:

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are Off


Similar Threads
Thread Thread Starter Forum Replies Last Post
blocking message freddymon Microsoft Outlook Discussion 2 5th Aug 2008 07:05 PM
Automatic message blocking Anonyumous Microsoft Outlook 1 14th Jul 2004 12:08 AM
message blocking attachments LT Microsoft Outlook 1 6th May 2004 07:10 PM
Blocking Message =?Utf-8?B?QnJpYW4=?= Microsoft Outlook Discussion 0 22nd Apr 2004 12:21 PM
Blocking access to corporate network- Thsi is the default Blocking Message Good Microsoft Windows 2000 Networking 3 2nd Jan 2004 11:24 PM


Features
 

Advertising
 

Newsgroups
 


All times are GMT +1. The time now is 12:00 PM.