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 4029962
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 20, 20262026-05-20T11:24:42+00:00 2026-05-20T11:24:42+00:00

Ok, i have this dataset where I need to delete startin from column for

  • 0

Ok, i have this dataset where I need to delete startin from column for every other column. So i tried to do this with VBA since the dataset is quite large. I tried this but it will not work:

Sub Macro2()
'
' Macro2 Macro
'

'
    For clNumber = 4 To 500

    clNumber.Select                      //doesn't work
    Selection.Delete Shift:=xlToLeft
    Next

End Sub

Any ideas on how to select the column of which the number is clNumber and delete that?

  • 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-05-20T11:24:43+00:00Added an answer on May 20, 2026 at 11:24 am

    Change clNumber to Columns(clNumber), as clNumber is just a number, but not an object.

    Actually, it is better just to use

    For clNumber = 4 To 500
      Columns(clNumber).Delete Shift:=xlToLeft
    Next
    

    as Select is unnecessary.

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

Sidebar

Related Questions

I have a list of rows from a dataset that I need to iterate
I have this XML file I need to extract the HTML Code from mono
I'm using EF, I have this query, I need to omit some information from
i have dataset that contain data. i need to run any query on this
I have this code so I can grab the values ind the dataset before
I have a DataSet with some Datatables and I am saving this DataSet as
I have the dataset (pts) like this: x <- seq(-124.25,length=115,by=0.5) y <- seq(26.25,length=46,by=0.5) z
This is the code I have: Sub Main() Dim dts As New DataSet Dim
I have created Windows Application. In this, I have multiple tables in dataset, now
I have an existing SQL Server database, where I store data from large specific

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.