2

I have uploaded an xlsm file to google drive. When opening it uses google sheets, and when downloading it converts it to xlsx (no vba modules). Is there another way to get my code back? (The original file on my computer is gone).

  • 1
    Your question has nothing to do with programming. – Dennis Kozevnikoff Jul 06 '20 at 15:23
  • When opening an excel file as a google sheet, it's a google sheet, which is not excel at all. It's an entirely different application and platform and your workbook was converted to Google Sheet format. So yes, your VBA won't survive that. – JNevill Jul 06 '20 at 15:28
  • As soon as you open it in Google sheets, it should be doing the conversion (from my understanding). If you don't want it converted, refrain from opening in Google sheets. Have you tried uploading the xlsm and just redownloading it without opening in Google? – mochsner Jul 06 '20 at 15:29
  • Hit the download icon – Davesexcel Jul 06 '20 at 15:39

1 Answers1

3

Apologies, self answer.

In Google Drive Settings there is a toggle box to 'Convert uploaded files to google docs editor format'. This was ticked and so I lost the code as soon as I uploaded.

I have since tested it and without that tickbox ticked, the file remains in xlsm format, even if you open it in google sheets.

Also that tickbox is not ticked by default, so you really have to put some effort in to lose all of your code like I did.