Home |
Search |
Today's Posts |
|
#1
![]()
Posted to microsoft.public.excel.programming
|
|||
|
|||
![]()
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 |
#2
![]()
Posted to microsoft.public.excel.programming
|
|||
|
|||
![]()
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 |
#3
![]()
Posted to microsoft.public.excel.programming
|
|||
|
|||
![]()
Thank you very much for suggestions
Do I need to set it to True at the end of macro? What if I don't set it to True, if I run another macro, will the default setting be false? Thank you very much for any suggestions Eric "Per Jessen" wrote: 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 . |
#4
![]()
Posted to microsoft.public.excel.programming
|
|||
|
|||
![]()
When the macro stop DisplayAlerts is reset to true, but I would always
reset it to true as soon as possible in my macro, as other unexpected alerts will be supressed until it is set to True. -- Per On 23 Mar., 03:09, Eric wrote: Thank you very much for suggestions Do I need to set it to True at the end of macro? What if I don't set it to True, if I run another macro, will the default setting be false? Thank you very much for any suggestions Eric "Per Jessen" wrote: 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 .- Skjul tekst i anførselstegn - - Vis tekst i anførselstegn - |
#5
![]()
Posted to microsoft.public.excel.programming
|
|||
|
|||
![]()
hi
if you don't set it to true again then all display messages, alerts, warnings ect will not be display whether you are running a macro or not. it is not wise to turn off alerts and NOT turn them back on. for the duration of a singel macro, it may be permissible but never let a macro stop without turning alerts back on. otherwise, excel will be severly crippled. regards FSt1 "Eric" wrote: Thank you very much for suggestions Do I need to set it to True at the end of macro? What if I don't set it to True, if I run another macro, will the default setting be false? Thank you very much for any suggestions Eric "Per Jessen" wrote: 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 . |
Reply |
Thread Tools | Search this Thread |
Display Modes | |
|
|
![]() |
||||
Thread | Forum | |||
macro to display message,when open workbook | Excel Discussion (Misc queries) | |||
Display a message when a macro is executing | Excel Discussion (Misc queries) | |||
Display message in macro | Excel Programming | |||
Display a message whilst a macro runs | Excel Programming |