Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 44
Default remove msg box prompt

Hi,

I am running a macro but it is not running smoothly due to many msg prompt
boxes appearing to ask to click "Yes","No" etc and there is also another msg
box that prompted me that there is a large amt of data from clipboard to be
copied over, and also another msg box that ask me to replace existing file,
"yes" or "no prompt.

How can i script it so that they will not appear?
  #2   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 789
Default remove msg box prompt

On Apr 16, 8:58 am, Junior728
wrote:
Hi,

I am running a macro but it is not running smoothly due to many msg prompt
boxes appearing to ask to click "Yes","No" etc and there is also another msg
box that prompted me that there is a large amt of data from clipboard to be
copied over, and also another msg box that ask me to replace existing file,
"yes" or "no prompt.

How can i script it so that they will not appear?


Hi
Put in
Application.Displayalerts = False
'your code
Application.Displayalerts = True

regards
Paul

  #3   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 3,101
Default remove msg box prompt

Try this:-

Application.DisplayAlerts = False

Don't forget to set it back to TRUE at the end of your macro.

Mike

"Junior728" wrote:

Hi,

I am running a macro but it is not running smoothly due to many msg prompt
boxes appearing to ask to click "Yes","No" etc and there is also another msg
box that prompted me that there is a large amt of data from clipboard to be
copied over, and also another msg box that ask me to replace existing file,
"yes" or "no prompt.

How can i script it so that they will not appear?

  #4   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 44
Default remove msg box prompt

Hi,

it doesnt work. The msg prompt still comes up as before. Is there other
methods of deactivating it? OR Did i put in correctly as in my e,g???,:

Sub ScrapInfo()
'Criteria: Need to fill up Col M with WH info first.

Application.ScreenUpdating = False
Application.DisplayAlerts = False 'HOW TO OFF ALL DIALOG BOXES?


Dim LastRow As Long

f$ = InputBox("Pls type FileName", "Input FileName to Open")
g$ = InputBox("Pls type SheetName", "Input SheetName to Open,
RES,CAP,OTHERS?"
.................................................. ........................centre of code

Application.CutCopyMode = False
Columns("C:C").Select
Range("C14").Activate
Selection.Copy
Selection.PasteSpecial Paste:=xlPasteValues, Operation:=xlNone,
SkipBlanks _
:=False, Transpose:=False

ActiveWorkbook.SaveAs Filename:= _
"H:\My WorkStation\scraplist.xls", FileFormat:= _
xlNormal, Password:="", WriteResPassword:="",
ReadOnlyRecommended:=False _
, CreateBackup:=False

ActiveWorkbook.Close

Application.DisplayAlerts = False

End Sub



"Mike" wrote:

Try this:-

Application.DisplayAlerts = False

Don't forget to set it back to TRUE at the end of your macro.

Mike

"Junior728" wrote:

Hi,

I am running a macro but it is not running smoothly due to many msg prompt
boxes appearing to ask to click "Yes","No" etc and there is also another msg
box that prompted me that there is a large amt of data from clipboard to be
copied over, and also another msg box that ask me to replace existing file,
"yes" or "no prompt.

How can i script it so that they will not appear?

  #5   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 110
Default remove msg box prompt

Hello
Which message is still popping up during your code?
Please note:
Application.CutCopyMode = False

should be placed immediately after the paste operation in your code ie:

Selection.PasteSpecial Paste:=xlPasteValues, Operation:=xlNone, SkipBlanks _
:=False, Transpose:=False

Application.CutCopyMode = False

In addition I would suggest the line
Application.DisplayAlerts = False

to be placed immecdiately before
ActiveWorkbook.SaveAs Filename:= _

"H:\My WorkStation\scraplist.xls", FileFormat:= _
xlNormal, Password:="", WriteResPassword:="", ReadOnlyRecommended:=False _
, CreateBackup:=False


HTH
Cordially
Pascal

"Junior728" a écrit dans le message de
news: ...
Hi,

it doesnt work. The msg prompt still comes up as before. Is there other
methods of deactivating it? OR Did i put in correctly as in my e,g???,:

Sub ScrapInfo()
'Criteria: Need to fill up Col M with WH info first.

Application.ScreenUpdating = False
Application.DisplayAlerts = False 'HOW TO OFF ALL DIALOG BOXES?


Dim LastRow As Long

f$ = InputBox("Pls type FileName", "Input FileName to Open")
g$ = InputBox("Pls type SheetName", "Input SheetName to Open,
RES,CAP,OTHERS?")
.................................................. .......................centre
of code

Application.CutCopyMode = False
Columns("C:C").Select
Range("C14").Activate
Selection.Copy
Selection.PasteSpecial Paste:=xlPasteValues, Operation:=xlNone,
SkipBlanks _
:=False, Transpose:=False

ActiveWorkbook.SaveAs Filename:= _
"H:\My WorkStation\scraplist.xls", FileFormat:= _
xlNormal, Password:="", WriteResPassword:="",
ReadOnlyRecommended:=False _
, CreateBackup:=False

ActiveWorkbook.Close

Application.DisplayAlerts = False

End Sub



"Mike" wrote:

Try this:-

Application.DisplayAlerts = False

Don't forget to set it back to TRUE at the end of your macro.

Mike

"Junior728" wrote:

Hi,

I am running a macro but it is not running smoothly due to many msg
prompt
boxes appearing to ask to click "Yes","No" etc and there is also
another msg
box that prompted me that there is a large amt of data from clipboard
to be
copied over, and also another msg box that ask me to replace existing
file,
"yes" or "no prompt.

How can i script it so that they will not appear?





  #6   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 44
Default remove msg box prompt

Hi Papou,

These are the 3 msgbox encountered: in my macro

1.save large data on clipboard?
2.save over existing file?
3.Msgbox to inform that a certain file is moved to folder

Do i need to have diff ways for closing each one of them? or is there a
general code to close all msg prompted like this.

"papou" wrote:

Hello
Which message is still popping up during your code?
Please note:
Application.CutCopyMode = False

should be placed immediately after the paste operation in your code ie:

Selection.PasteSpecial Paste:=xlPasteValues, Operation:=xlNone, SkipBlanks _
:=False, Transpose:=False

Application.CutCopyMode = False

In addition I would suggest the line
Application.DisplayAlerts = False

to be placed immecdiately before
ActiveWorkbook.SaveAs Filename:= _

"H:\My WorkStation\scraplist.xls", FileFormat:= _
xlNormal, Password:="", WriteResPassword:="", ReadOnlyRecommended:=False _
, CreateBackup:=False


HTH
Cordially
Pascal

"Junior728" a écrit dans le message de
news: ...
Hi,

it doesnt work. The msg prompt still comes up as before. Is there other
methods of deactivating it? OR Did i put in correctly as in my e,g???,:

Sub ScrapInfo()
'Criteria: Need to fill up Col M with WH info first.

Application.ScreenUpdating = False
Application.DisplayAlerts = False 'HOW TO OFF ALL DIALOG BOXES?


Dim LastRow As Long

f$ = InputBox("Pls type FileName", "Input FileName to Open")
g$ = InputBox("Pls type SheetName", "Input SheetName to Open,
RES,CAP,OTHERS?")
.................................................. .......................centre
of code

Application.CutCopyMode = False
Columns("C:C").Select
Range("C14").Activate
Selection.Copy
Selection.PasteSpecial Paste:=xlPasteValues, Operation:=xlNone,
SkipBlanks _
:=False, Transpose:=False

ActiveWorkbook.SaveAs Filename:= _
"H:\My WorkStation\scraplist.xls", FileFormat:= _
xlNormal, Password:="", WriteResPassword:="",
ReadOnlyRecommended:=False _
, CreateBackup:=False

ActiveWorkbook.Close

Application.DisplayAlerts = False

End Sub



"Mike" wrote:

Try this:-

Application.DisplayAlerts = False

Don't forget to set it back to TRUE at the end of your macro.

Mike

"Junior728" wrote:

Hi,

I am running a macro but it is not running smoothly due to many msg
prompt
boxes appearing to ask to click "Yes","No" etc and there is also
another msg
box that prompted me that there is a large amt of data from clipboard
to be
copied over, and also another msg box that ask me to replace existing
file,
"yes" or "no prompt.

How can i script it so that they will not appear?




  #7   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 110
Default remove msg box prompt

Hello
Provided the lines Application.DisplayAlerts = False and
Application.CutCopyMode = False are positioned correctly in your code as I
mentioned in my previous reply, I would say no, there should be no need for
further specific instructions.
But may be someone will provide you with further advice.

HTH
Cordially
Pascal

"Junior728" a écrit dans le message de
news: ...
Hi Papou,

These are the 3 msgbox encountered: in my macro

1.save large data on clipboard?
2.save over existing file?
3.Msgbox to inform that a certain file is moved to folder

Do i need to have diff ways for closing each one of them? or is there a
general code to close all msg prompted like this.

"papou" wrote:

Hello
Which message is still popping up during your code?
Please note:
Application.CutCopyMode = False

should be placed immediately after the paste operation in your code ie:

Selection.PasteSpecial Paste:=xlPasteValues, Operation:=xlNone,
SkipBlanks _
:=False, Transpose:=False

Application.CutCopyMode = False

In addition I would suggest the line
Application.DisplayAlerts = False

to be placed immecdiately before
ActiveWorkbook.SaveAs Filename:= _

"H:\My WorkStation\scraplist.xls", FileFormat:= _
xlNormal, Password:="", WriteResPassword:="", ReadOnlyRecommended:=False
_
, CreateBackup:=False


HTH
Cordially
Pascal

"Junior728" a écrit dans le message
de
news:
...
Hi,

it doesnt work. The msg prompt still comes up as before. Is there other
methods of deactivating it? OR Did i put in correctly as in my e,g???,:

Sub ScrapInfo()
'Criteria: Need to fill up Col M with WH info first.

Application.ScreenUpdating = False
Application.DisplayAlerts = False 'HOW TO OFF ALL DIALOG BOXES?


Dim LastRow As Long

f$ = InputBox("Pls type FileName", "Input FileName to Open")
g$ = InputBox("Pls type SheetName", "Input SheetName to Open,
RES,CAP,OTHERS?")
.................................................. .......................centre
of code

Application.CutCopyMode = False
Columns("C:C").Select
Range("C14").Activate
Selection.Copy
Selection.PasteSpecial Paste:=xlPasteValues, Operation:=xlNone,
SkipBlanks _
:=False, Transpose:=False

ActiveWorkbook.SaveAs Filename:= _
"H:\My WorkStation\scraplist.xls", FileFormat:= _
xlNormal, Password:="", WriteResPassword:="",
ReadOnlyRecommended:=False _
, CreateBackup:=False

ActiveWorkbook.Close

Application.DisplayAlerts = False

End Sub



"Mike" wrote:

Try this:-

Application.DisplayAlerts = False

Don't forget to set it back to TRUE at the end of your macro.

Mike

"Junior728" wrote:

Hi,

I am running a macro but it is not running smoothly due to many msg
prompt
boxes appearing to ask to click "Yes","No" etc and there is also
another msg
box that prompted me that there is a large amt of data from
clipboard
to be
copied over, and also another msg box that ask me to replace
existing
file,
"yes" or "no prompt.

How can i script it so that they will not appear?






  #8   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 789
Default remove msg box prompt

Hi
These look like message boxes created by you, not Excel itself, so I
don't think the displayalerts will work on them. The buttons on these
forms call macros, so simply call the macros directly

MacroName parameterlist

where parameterlist is the list of paremeters for the macro to work on
(if any). Delete the message box code and replace with the MacroName
code as above.

regards
Paul

On Apr 16, 10:46 am, Junior728
wrote:
Hi Papou,

These are the 3 msgbox encountered: in my macro

1.save large data on clipboard?
2.save over existing file?
3.Msgbox to inform that a certain file is moved to folder

Do i need to have diff ways for closing each one of them? or is there a
general code to close all msg prompted like this.



"papou" wrote:
Hello
Which message is still popping up during your code?
Please note:
Application.CutCopyMode = False

should be placed immediately after the paste operation in your code ie:


Selection.PasteSpecial Paste:=xlPasteValues, Operation:=xlNone, SkipBlanks _
:=False, Transpose:=False


Application.CutCopyMode = False


In addition I would suggest the line
Application.DisplayAlerts = False

to be placed immecdiately before
ActiveWorkbook.SaveAs Filename:= _

"H:\My WorkStation\scraplist.xls", FileFormat:= _
xlNormal, Password:="", WriteResPassword:="", ReadOnlyRecommended:=False _
, CreateBackup:=False


HTH
Cordially
Pascal


"Junior728" a écrit dans le message de
news: 7920C519-CF42-4A92-A683-4533F48AB__BEGIN_MASK_n#9g02mG7!__...__END_MASK_i? ...
Hi,


it doesnt work. The msg prompt still comes up as before. Is there other
methods of deactivating it? OR Did i put in correctly as in my e,g???,:


Sub ScrapInfo()
'Criteria: Need to fill up Col M with WH info first.


Application.ScreenUpdating = False
Application.DisplayAlerts = False 'HOW TO OFF ALL DIALOG BOXES?


Dim LastRow As Long


f$ = InputBox("Pls type FileName", "Input FileName to Open")
g$ = InputBox("Pls type SheetName", "Input SheetName to Open,
RES,CAP,OTHERS?")
.................................................. ........................ce*ntre
of code


Application.CutCopyMode = False
Columns("C:C").Select
Range("C14").Activate
Selection.Copy
Selection.PasteSpecial Paste:=xlPasteValues, Operation:=xlNone,
SkipBlanks _
:=False, Transpose:=False


ActiveWorkbook.SaveAs Filename:= _
"H:\My WorkStation\scraplist.xls", FileFormat:= _
xlNormal, Password:="", WriteResPassword:="",
ReadOnlyRecommended:=False _
, CreateBackup:=False


ActiveWorkbook.Close


Application.DisplayAlerts = False


End Sub


"Mike" wrote:


Try this:-


Application.DisplayAlerts = False


Don't forget to set it back to TRUE at the end of your macro.


Mike


"Junior728" wrote:


Hi,


I am running a macro but it is not running smoothly due to many msg
prompt
boxes appearing to ask to click "Yes","No" etc and there is also
another msg
box that prompted me that there is a large amt of data from clipboard
to be
copied over, and also another msg box that ask me to replace existing
file,
"yes" or "no prompt.


How can i script it so that they will not appear?- Hide quoted text -


- Show quoted text -



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
Remove Prompt to Open File as Read-Only (Excel 2007) kerryb13 Excel Discussion (Misc queries) 3 April 19th 23 02:13 PM
How to remove a query prompt in Excel 2003 Frustrated Excel Discussion (Misc queries) 1 November 2nd 05 05:21 PM
Remove read only prompt macsaintly Excel Discussion (Misc queries) 3 September 2nd 05 05:49 AM
remove enable macro prompt Redden Excel Discussion (Misc queries) 1 August 17th 05 12:16 PM
remove Worksheet using Sh.Delete without prompt coco Excel Programming 3 June 21st 05 10:28 PM


All times are GMT +1. The time now is 10:59 AM.

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"