View Single Post
 
Old 10-29-2015, 12:24 AM
PRA007's Avatar
PRA007 PRA007 is offline Windows 7 32bit Office 2010 32bit
Competent Performer
 
Join Date: Dec 2014
Location: Ahmedabad, Gujrat, India
Posts: 145
PRA007 is on a distinguished road
Default

Sorry to bother but this is my first encounter with excel macro.

I tried running the macro from main.xlsm but its not working, nor showing any error.
I think problem is with Path to database file. How do I Run if both of my files are on desktop i.e. C:\Users\rahulkumar.patel\Desktop.
From wchich document I should run macro.
I tried changing like this.
Code:
xlShtTgt = Workbooks("C:\Users\rahulkumar.patel\Desktop\Main.xlsm").Sheets(1)
Set xlShtSrc = Workbooks("C:\Users\rahulkumar.patel\Desktop\Database2.xlsx").Sheets(1)
Can I direcly run this excel macro from CMD by saving it as .vbs?
Reply With Quote