View Single Post
  #2   Report Post  
Posted to microsoft.public.excel.programming
Per Jessen[_2_] Per Jessen[_2_] is offline
external usenet poster
 
Posts: 703
Default How not to display any pop up message for macro?

Maybe this:

Application.DisplayAlerts=False

Just remember to set to True again.

Regards,
Per

On 23 Mar., 01:22, Eric wrote:
When macro imports an external links into sheets, it pops up a message is
about the pasting area is larger then worksheet for confirmation, does anyone
have any suggestions on how not to display any pop up message for running
macro?

Thanks in advance for any suggestions

qryConnect = "URL;http://www.mmacycles.com"
Set anySheet = Sheets("MMA")
With anySheet.QueryTables.Add(Connection:=qryConnect, Destination _
* * :=anySheet.Range("$A$1"))

* * * * .Name = "o070104"
* * * * .FieldNames = True
* * * * .RowNumbers = False
* * * * .FillAdjacentFormulas = False
* * * * .PreserveFormatting = True
* * * * .RefreshOnFileOpen = True
* * * * .BackgroundQuery = True
* * * * .RefreshStyle = xlInsertEntireRows
* * * * .SavePassword = False
* * * * .SaveData = True
* * * * .AdjustColumnWidth = True
* * * * .RefreshPeriod = 0
* * * * .WebSelectionType = xlEntirePage
* * * * .WebFormatting = xlWebFormattingNone
* * * * .WebPreFormattedTextToColumns = True
* * * * .WebConsecutiveDelimitersAsOne = True
* * * * .WebSingleBlockTextImport = False
* * * * .WebDisableDateRecognition = False
* * * * .WebDisableRedirections = False
* * * * .Refresh BackgroundQuery:=False
* * End With