Lines of code getting stripped when uploaded to cloud storage?

Dix_Fix

New Member
Joined
Aug 6, 2020
Messages
6
Office Version
  1. 2013
Platform
  1. Windows
Hi I am fairly new to coding though I can't figure what I'm doing wrong.
I have a functioning userform based .pdf lookup VBA code.
It all works fine within my computer.
My problem is when I upload it to Google Drive, then download it to try it out.
I loose a line of code from my ThisWorkbook Sub, which is (when downloaded by a user) to create a desktop icon/shortcut upon request on their system.
I have been through my Norton and all seems to be fine there.
I would love to be pointed toward what I'm doing wrong.
 

Attachments

  • MR_Excel.png
    MR_Excel.png
    100.9 KB · Views: 15

Excel Facts

Can you AutoAverage in Excel?
There is a drop-down next to the AutoSum symbol. Open the drop-down to choose AVERAGE, COUNT, MAX, or MIN
Welcome to the MrExcel Message Board!

I don't think that you are doing something wrong as I am not aware of any OS method that would remove that line selectively from your code.

However, the first thing that I would try in such a case would be uploading a renamed file to the Drive as it might be a sync issue on the cloud. Maybe the initial workbook was uploaded without that particular code line and the future uploads didn't sync properly?
 
Upvote 0
Solution
Side question: Is there any macro in the project that alters the code itself after opening the workbook to avoid the shortcut creation after the initial file opening? If that's the case, and if the file is opened in the Drive folder directly, then it might be overwritten after this self-change and the future downloader might be downloading the changed workbook.
 
Upvote 0
Hi smozgur I have tried uploading the code to google drive as several different names (each time ensuring that line of code is there when saving my VBA script) each time when I download it to check how it works that particular line is missing and a blank line is where it was. The rest of the code runs fine. Just cant create a desktop icon as the line that calls the code isn't there.
The line of code simply calls a sub that checks to see if a desktop icon exists on the users computer and if not asks if one should be created. If yes continues to make a desktop shortcut then gives it an particular .ico file
I wasn't sure if Excel excludes me uploading a file which when downloaded has the potential to change the user's desktop.
I'm not understanding how any outside program i.e. google drive or Norton could actually steal a line of my code. Sure google could deny access to a code piece/file/folder or Norton could block access that would disallow the code to run.
As for other code that would delete this line. The shortcut code only creates an icon (when called) otherwise it has no interaction with the other workbooks vba script.
I'm scratching my head!!
 
Upvote 0

Forum statistics

Threads
1,214,864
Messages
6,121,986
Members
449,058
Latest member
oculus

We've detected that you are using an adblocker.

We have a great community of people providing Excel help here, but the hosting costs are enormous. You can help keep this site running by allowing ads on MrExcel.com.
Allow Ads at MrExcel

Which adblocker are you using?

Disable AdBlock

Follow these easy steps to disable AdBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the icon in the browser’s toolbar.
2)Click on the "Pause on this site" option.
Go back

Disable AdBlock Plus

Follow these easy steps to disable AdBlock Plus

1)Click on the icon in the browser’s toolbar.
2)Click on the toggle to disable it for "mrexcel.com".
Go back

Disable uBlock Origin

Follow these easy steps to disable uBlock Origin

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back

Disable uBlock

Follow these easy steps to disable uBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back
Back
Top