Results 1 to 7 of 7

How to Implement VBA Script to 1000+ Excel Files in One Go

Threaded View

  1. #1
    Registered User
    Join Date
    12-16-2020
    Location
    Karachi, Pakistan
    MS-Off Ver
    2016
    Posts
    13

    How to Implement VBA Script to 1000+ Excel Files in One Go

    I want to implement given below VBA Script to 1000+ excel files in One go. below script is working but I have to run this script one by one on files. Is this possible to run this script in one go?
    All files are in one folder, exact count of files is 1068, 1 sheet in every file.


    Sub DeleteCols()
        Application.ScreenUpdating = False
        Dim i As Long, lCol As Long, delRange As Range
        lCol = Cells(1, Columns.Count).End(xlToLeft).Column
        For i = 1 To lCol
            If InStr(Cells(1, i), "/description") > 0 Then
                If delRange Is Nothing Then
                    Set delRange = Columns(i)
                Else
                    Set delRange = Union(delRange, Columns(i))
                End If
            End If
        Next i
        If Not delRange Is Nothing Then delRange.Delete
        Application.ScreenUpdating = True
    End Sub
    Last edited by mrizwan356; 12-17-2020 at 07:34 AM.

Thread Information

Users Browsing this Thread

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

Similar Threads

  1. How can I change the VBA script for all Excel files instantly?
    By EvelynLoh in forum Excel Programming / VBA / Macros
    Replies: 2
    Last Post: 10-08-2018, 10:46 PM
  2. creating vba script to write semi complex formula across 1000+cells in 1 column
    By dvault101 in forum Excel Programming / VBA / Macros
    Replies: 2
    Last Post: 11-18-2015, 04:27 PM
  3. Replies: 4
    Last Post: 03-28-2013, 08:43 AM
  4. Deleting files in set directoty (implement a sub that does this into anonther program)
    By papasideris in forum Excel Programming / VBA / Macros
    Replies: 0
    Last Post: 04-28-2012, 08:42 PM
  5. Script not identifying excel files?
    By mlf84 in forum Excel Programming / VBA / Macros
    Replies: 1
    Last Post: 10-22-2010, 02:55 PM
  6. How do I IMPLEMENT regular expressions in a script??
    By doctormelodious in forum Excel Programming / VBA / Macros
    Replies: 0
    Last Post: 05-21-2007, 01:06 AM
  7. update excel files using a vba script
    By adinic in forum Excel Programming / VBA / Macros
    Replies: 8
    Last Post: 04-17-2006, 04:55 PM

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