View Single Post
  #5   Report Post  
Posted to microsoft.public.excel.programming
papou papou is offline
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?