Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • SEARCH
  • Home
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 8186589
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 7, 20262026-06-07T02:15:41+00:00 2026-06-07T02:15:41+00:00

I took the macro code from using the text to columns wizard and put

  • 0

I took the macro code from using the “text to columns” wizard and put it in my code. But it’s not working on a consistent basis.

I am getting “method ‘range’ of object ‘_global’ failed” (sometimes)
I looked it up, and applied solutions, that either change nothing (it errors a few executions later)

The current attempt to specify it better has left me with

With Shipping
.ActiveSheet.Columns(letter & ":" & letter).TextToColumns Destination:=Range(letter & "1"), DataType:=xlDelimited, _
    TextQualifier:=xlDoubleQuote, ConsecutiveDelimiter:=True, Tab:=False, _
    Semicolon:=False, Comma:=False, Space:=True, Other:=False, FieldInfo _
    :=Array(Array(1, 1), Array(2, 9), Array(3, 9), Array(4, 9)), TrailingMinusNumbers:= _
    True
End With

I have no idea if it wants me to specify better for the first half or the destination, which I can’t find a solution for.

How do I make this work?

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-06-07T02:15:44+00:00Added an answer on June 7, 2026 at 2:15 am

    Rather than using (eg) .ActiveSheet.Columns("A:A") why not use the simpler form .ActiveSheet.Columns(1) ?

    And add a period before Range in the Destination parameter, otherwise that range will default to the active sheet.

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I took the example code from the Kendo UI demos at http://demos.kendoui.com/web/grid/remote-data.html , binding
I took a hiatus from C and am just getting back into it again.
I took this code from Facebook's documentation to get me started in learning how
I took some code from some questions here in SO as well as some
I took some code from the internet that searches data entered in a table
I took the following code from http://blogs.msdn.com/b/jaredpar/archive/2008/05/16/switching-on-types.aspx static class TypeSwitch { public class CaseInfo
I took this code from another question and now I'm trying to get the
I took the rendered page from the SWT Browser and exported it to an
I took some code here: Check if role consists of particular user in DB?
I have some code that runs fairly well, but I would like to make

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.