Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 17
Default Blocking a Windows Message

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.
  #2   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 533
Default Blocking a Windows Message

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


  #3   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 17
Default Blocking a Windows Message

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



  #4   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 533
Default Blocking a Windows Message

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" wrote in message
...
| 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" wrote in message
| ...
| | 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
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
Windows application error message Tony Tong Excel Discussion (Misc queries) 0 September 15th 06 07:30 AM
windows help message board? blazon Excel Discussion (Misc queries) 2 September 22nd 05 05:50 PM
Windows cannot find file message Morpheus Excel Discussion (Misc queries) 5 December 15th 04 06:49 AM
Windows message text font uno@korsmaa Excel Programming 1 September 29th 04 12:55 AM
Call up a Windows Message from Excel Zak[_2_] Excel Programming 1 November 8th 03 06:04 AM


All times are GMT +1. The time now is 10:50 PM.

Powered by vBulletin® Copyright ©2000 - 2024, Jelsoft Enterprises Ltd.
Copyright ©2004-2024 ExcelBanter.
The comments are property of their posters.
 

About Us

"It's about Microsoft Excel"