0

I am using vb.net to copy a range of data from worksheet "A" using the following code:

'Set range of data to be copied
xlRng = xlsheet.Range("A2:k" & IntAmountOfRows)
xlRng.Copy()

'close source
xlWb.Close(False)
xlApp.Quit()

But when I do this, it asks the user if it wants to keep the huge amount of data on the clipboard. Is there a way to let the application skip this check? I dont want the user to get any annoying popups when they will press yes anyway.

Gutanoth
  • 842
  • 5
  • 20
  • 39

1 Answers1

1

Application.DisplayAlerts = False should help out. See this SO question for more info. For a VB.net only solution, check this SO discussion.

Community
  • 1
  • 1
Aaron Thomas
  • 5,054
  • 8
  • 43
  • 89