My file is located in C:\Users\pc\Desktop
my file name is demo.xlsx
macro will be added in a different file excluding demo.xlsx
file is not opened so open the file by vba clear all the data in column A and Column B and save the file and close it
My file is located in C:\Users\pc\Desktop
my file name is demo.xlsx
macro will be added in a different file excluding demo.xlsx
file is not opened so open the file by vba clear all the data in column A and Column B and save the file and close it
Hi rider!
Sub test() Dim pth$ pth = "C:\Users\pc\Desktop\demo.xlsx" Application.ScreenUpdating = False Workbooks.Open pth ActiveSheet.Range("a:b") = "" ActiveWorkbook.Close True Application.ScreenUpdating = True End Sub
I think this code contains error it is not working
i am not getting error but after runing the macro it is processing but 5min have been passed but still it is unable to process
my data is not big i think code has an error plz have a relook Sir
Sub Doit() Workbooks.Open Filename:="C:\Users\pc\Desktop\demo.xlsx" Set wb = ActiveWorkbook [a:b].ClearContents wb.Save wb.Close End Sub