+ Reply to Thread
Results 1 to 3 of 3

Selection.TextToColumns auto-select "yes"

  1. #1
    Registered User
    Join Date
    10-24-2013
    Location
    Utrecht, The Netherlands
    MS-Off Ver
    Excel 2003
    Posts
    2

    Selection.TextToColumns auto-select "yes"

    Part of my macro contains the action text to columns, where the data is split up over two columns. However, when running the macro, a pop-up appears: "Do you want to replace the contents of the destination cells?"
    As part of my macro, I would like to include some vba that automatically selects "Yes" as an answer to that question. How can I do that?

    VBA code for the text to columns action:

    Columns("S:S").Select
    Selection.TextToColumns Destination:=Range("S1"), DataType:=xlDelimited, _
    TextQualifier:=xlDoubleQuote, ConsecutiveDelimiter:=True, Tab:=True, _
    Semicolon:=False, Comma:=False, Space:=True, Other:=False, FieldInfo _
    :=Array(Array(1, 1), Array(2, 1)), TrailingMinusNumbers:=True

  2. #2
    Forum Moderator davesexcel's Avatar
    Join Date
    02-19-2006
    Location
    Regina
    MS-Off Ver
    MS 365
    Posts
    13,483

    Re: Selection.TextToColumns auto-select "yes"

    Try
    Please Login or Register  to view this content.

  3. #3
    Registered User
    Join Date
    10-24-2013
    Location
    Utrecht, The Netherlands
    MS-Off Ver
    Excel 2003
    Posts
    2

    Re: Selection.TextToColumns auto-select "yes"

    Quote Originally Posted by davesexcel View Post
    Try
    Please Login or Register  to view this content.
    Thanks! It works.

+ Reply to Thread

Thread Information

Users Browsing this Thread

There are currently 1 users browsing this thread. (0 members and 1 guests)

Similar Threads

  1. [SOLVED] "copy paste" using "=" but its only pulling the first value of the selection?
    By bauerbach in forum Excel Programming / VBA / Macros
    Replies: 3
    Last Post: 06-07-2012, 02:59 PM
  2. Excel Message auto select "Yes"
    By t0m46 in forum Excel Programming / VBA / Macros
    Replies: 3
    Last Post: 08-09-2010, 05:41 AM
  3. Icon for "Wrap" and for "Centre Across Selection"
    By BeSmart in forum Excel Formulas & Functions
    Replies: 2
    Last Post: 11-16-2005, 02:50 PM
  4. Fix Code: Select Case and "Contains" selection
    By Bettergains in forum Excel Programming / VBA / Macros
    Replies: 5
    Last Post: 04-25-2005, 10:06 PM
  5. [SOLVED] Why "center across selection" rather than "merge" cells? What is.
    By Michele in forum Excel General
    Replies: 4
    Last Post: 04-25-2005, 10:06 AM

Tags for this Thread

Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts

Search Engine Friendly URLs by vBSEO 3.6.0 RC 1