0
votes

I have written some macros in personal.xls so that they are available to me when i open any excel file

However when i open an excel file using vbscript - CreateObject("Excel.Application") the macros written in personal.xls are not available

Any idea how i can i get those macros available to me when i open an excel using code.

Thanks, Shrikant

1

1 Answers

0
votes

I found the answer to this. I should be opening personal.xls and then the required file. That way the macros in personal.xls will be available.

  Set PRSNL = XL.Workbooks.Open("Path to Personal.xls")
  XL.Visible = True    
  Set WKB = XL.Workbooks.open(Path to required file)