• 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
Auto Run VBA Code on time without opening excel file
#1
Video 
Hi,


Greeting from Kanhaiyalal , I have written a code for example, i want that my code run automatically on the time when will 11:00 AM in my PC. from vb script code.


thanks 
Kanhaiyalal


Attached Files
.xlsm   Target.xlsm (Size: 33.78 KB / Downloads: 6)
  Reply
#2
You will have to write the code to be run in the below Subroutine

Sub Auto_Open

End Sub

And then create a Windows Scheduler to open the file in a particular time. Sub Auto_Open will automatically run on opening the file
Regards,
Vivekananda Sinha

If you cannot change the way you learn, how can you change the way you earn.  Smile
  Reply
#3
(19-Mar-2019, 01:42 PM)Vivekananda Sinha Wrote: You will have to write the code to be run in the below Subroutine

Sub Auto_Open

End Sub

And then create a Windows Scheduler to open the file in a particular time. Sub Auto_Open will automatically run on opening the file

Dear Sir,



Thanks for reply, it's nice way but when i opens another time then code will auto run, I want that when I will open my file for other work, Then code do not works.



Regards
Kanhaiya
  Reply
#4
If this workbook.name="admin.xlsm" then exit sub

Write the above code in the top of the Auto_Open subroutine.

And then when you want to work on the file, just rename the file as admin. The file will open as usual.
Regards,
Vivekananda Sinha

If you cannot change the way you learn, how can you change the way you earn.  Smile
  Reply
#5
(20-Mar-2019, 08:00 AM)Vivekananda Sinha Wrote: If this workbook.name="admin.xlsm" then exit sub

Write the above code in the top of the Auto_Open subroutine.

And then when you want to work on the file, just rename the file as admin. The file will open as usual.

Thanks a lot sir,
  Reply


Related Topics
Topic Author Replies Views Last Post
  Others Calculate idle time no movement of mouse and key board Inderjeet Pal 0 876 28-Apr-2020, 11:59 AM
Last Post: Inderjeet Pal
  Copy and Paste Need help on code Inderjeet Pal 0 915 15-Feb-2020, 04:23 PM
Last Post: Inderjeet Pal
  Error Handling File is not opening Chandan kumar 2 1,790 18-Jun-2019, 11:19 PM
Last Post: Chandan kumar
  Mail Mail draft code not working properly.. always miss half portion of the chart Inderjeet Pal 1 1,382 17-May-2019, 05:13 PM
Last Post: Chandan kumar
  Others Auto filter with date Sanjeev Gupta 1 1,618 20-Jul-2018, 02:09 PM
Last Post: Vivekananda Sinha
  Others Need to open file Automatically Chandan kumar 1 1,639 07-Jun-2018, 06:38 AM
Last Post: Vivekananda Sinha
  Data Filtering Auto filter refering criteria from cell value Gurpreet Singh 2 2,086 02-May-2018, 04:33 PM
Last Post: Gurpreet Singh
  Events unable to run the code through change event Shiva Bairwa 2 2,068 24-Apr-2018, 03:22 PM
Last Post: Shiva Bairwa
  Formula Error in VBA code Sujeet Singh 1 1,649 23-Apr-2018, 05:46 PM
Last Post: Vivekananda Sinha
  Data Filtering Auto filter Sanjeev Gupta 1 1,749 19-Apr-2018, 01:41 PM
Last Post: Vivekananda Sinha
  Files and Folders Save file in VBA Aanchal Gupta 2 2,491 05-Sep-2017, 07:19 PM
Last Post: Aanchal Gupta

Forum Jump:


Users browsing this topic: 1 Guest(s)