+ Reply to Thread
Results 1 to 7 of 7

Need VBA code to delete all data in FP:FP In mid bet Open and close workbook from path

  1. #1
    Forum Contributor
    Join Date
    07-21-2011
    Location
    Bangalore,India
    MS-Off Ver
    Excel 2007,2010,2016
    Posts
    695

    Need VBA code to delete all data in FP:FP In mid bet Open and close workbook from path

    Dear Expert

    I want delete the all the values in FP:FP column keep apart from one value Aegis Infoware Pvt. Ltd" criteria value..

    I have run code open and close the particular workbook from path In Mid i want run the code for delete all rest of values In FP:FP column In sheet "RAWDATA" apart from "Aegis Infoware Pvt. Ltd" criteria value.

    Please Login or Register  to view this content.
    find the attachment & code
    Run code from code master & Aegis Infoware Pvt. Ltd file get result change
    Attached Files Attached Files

  2. #2
    Forum Expert
    Join Date
    11-29-2010
    Location
    Ukraine
    MS-Off Ver
    Excel 2019
    Posts
    4,168

    Re: Need VBA code to delete all data in FP:FP In mid bet Open and close workbook from pat

    hi breadwwinner, option, this would delete what you need but you do not save changes to the workbook currently ...

    Please Login or Register  to view this content.

  3. #3
    Forum Contributor
    Join Date
    07-21-2011
    Location
    Bangalore,India
    MS-Off Ver
    Excel 2007,2010,2016
    Posts
    695

    Re: Need VBA code to delete all data in FP:FP In mid bet Open and close workbook from pat

    Hi Sir

    While run code It's seems work at backend it willnt get result what i expect

    might be i am wrong at some where find the attachment on excel file i want run code for that.
    Attached Files Attached Files

  4. #4
    Forum Expert
    Join Date
    11-29-2010
    Location
    Ukraine
    MS-Off Ver
    Excel 2019
    Posts
    4,168

    Re: Need VBA code to delete all data in FP:FP In mid bet Open and close workbook from pat

    it works my end, please check attachment, run code "test", though it takes time due heavy formulas need time for recalculation and they refer to RAWDATA data
    Attached Files Attached Files

  5. #5
    Forum Contributor
    Join Date
    07-21-2011
    Location
    Bangalore,India
    MS-Off Ver
    Excel 2007,2010,2016
    Posts
    695

    Re: Need VBA code to delete all data in FP:FP In mid bet Open and close workbook from pat

    Sir it works in Paritcular work book , but if it run through Path location to closedworkbook Sheets It doesnt...
    if u store file Aegis Infoware Pvt.Ltd In ur location then run it from different workbook through path assigns in code...

  6. #6
    Forum Expert
    Join Date
    11-29-2010
    Location
    Ukraine
    MS-Off Ver
    Excel 2019
    Posts
    4,168

    Re: Need VBA code to delete all data in FP:FP In mid bet Open and close workbook from pat

    the code in post #4 works as expected.

    Could you please post the code you are using and you do not get expected result. If it has those lines from post #1:

    Please Login or Register  to view this content.
    you would not get expected result as the workbook is closed without saving any changes. To save changes you should have it this way:

    Please Login or Register  to view this content.

  7. #7
    Forum Contributor
    Join Date
    07-21-2011
    Location
    Bangalore,India
    MS-Off Ver
    Excel 2007,2010,2016
    Posts
    695

    Re: Need VBA code to delete all data in FP:FP In mid bet Open and close workbook from pat

    Yes sir #4 works Perfectly thanks for valuable time spend on my thread... Thanks alot Once again

    Application.DisplayAlerts = False
    ActiveWorkbook.Save
    ActiveWorkbook.Close
    Application.DisplayAlerts = True

    Application.ScreenUpdating = 1

    End Sub

+ 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. Replies: 1
    Last Post: 12-26-2013, 04:55 AM
  2. Transfer Data from Open workbook to Close workbook
    By alexnkc in forum Excel Programming / VBA / Macros
    Replies: 0
    Last Post: 11-13-2013, 10:46 PM
  3. Code to open a workbook, do what i want, close it, and open the next
    By stuartsjg in forum Excel Programming / VBA / Macros
    Replies: 7
    Last Post: 09-30-2010, 05:43 PM
  4. worksheet combo box code runs when workbook open and close
    By hilander in forum Excel Programming / VBA / Macros
    Replies: 9
    Last Post: 11-29-2008, 10:25 PM
  5. Use cell in open workbook to id path to wanted data
    By NickiName in forum Excel General
    Replies: 3
    Last Post: 05-10-2007, 02:04 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