+ Reply to Thread
Results 1 to 2 of 2

Saving Specific Sheet With VBA

  1. #1
    Registered User
    Join Date
    07-17-2019
    Location
    Dhaka, Bangladesh
    MS-Off Ver
    2019
    Posts
    1

    Saving Specific Sheet With VBA

    also posted on mrexcel.com



    Private Sub CommandButton1_Click()
    Dim path As String
    Dim filename1 As String
    path = ThisWorkbook.path
    filename1 = Range("K2").Text
    Application.DisplayAlerts = False
    ActiveWorkbook.SaveAs Filename:=filename1 & ".txt", FileFormat:=xlOpenXMLWorkbook
    Application.DisplayAlerts = True


    End Sub



    This Code save the whole work book as txt file. But I want to save only specific sheet say sheet4.
    Last edited by dxzaber; 07-17-2019 at 09:32 AM. Reason: Correction

  2. #2
    Valued Forum Contributor dotchiejack's Avatar
    Join Date
    05-21-2015
    Location
    Antwerp,Belgium
    MS-Off Ver
    2016
    Posts
    507

    Re: Saving Specific Sheet With VBA

    Please Login or Register  to view this content.
    Click the * Add Reputation below to say thanks.

+ 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. Saving a specific sheet from workbook and leaving only one specific module in it.
    By Beginner1 in forum Excel Programming / VBA / Macros
    Replies: 1
    Last Post: 07-05-2019, 06:00 PM
  2. [SOLVED] Saving to a specific column in a second sheet
    By anthony1312002 in forum Excel Programming / VBA / Macros
    Replies: 5
    Last Post: 08-31-2018, 02:43 PM
  3. Saving a Workbook With A Specific File Name in a Specific Location
    By kyjae in forum Excel Programming / VBA / Macros
    Replies: 2
    Last Post: 11-06-2016, 02:49 PM
  4. Saving specific Sheet as CSV in the current location of the workbook
    By saif87 in forum Excel Programming / VBA / Macros
    Replies: 1
    Last Post: 08-14-2016, 07:00 AM
  5. Saving a sheet to a specific folder
    By kmraz in forum Excel Programming / VBA / Macros
    Replies: 5
    Last Post: 05-21-2013, 08:43 PM
  6. Replies: 0
    Last Post: 02-28-2013, 03:11 PM
  7. [SOLVED] Saving cell contents to specific cell in another sheet based on value in list
    By lukestkd in forum Excel Programming / VBA / Macros
    Replies: 6
    Last Post: 02-24-2013, 02:51 PM

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