I'm fed up with Access crashing after I've written and run some code and forgot to manually save it and hence all the new code is gone. How can I get Access to automatically save my VBA code upon, say, compile or run? I don't see any settings in VBA and I don't see any answers to a Google search. (Also, I don't think I've faced this problem in any other IDE.)
Related
I have 13 Google Cloud Functions running in my Google Cloud Project. Several of them are triggered by Google Cloud Scheduler. I went to make an edit to one of the functions the other day and got the following error when trying to view the "SOURCE".
When looking into this issue, the culprit seems to be that the Archive Bucket has been deleted or that the name has changed. When looking through the Container Registry as well as the buckets, I can confirm that they are no longer there. I think another developer in the project may have accidentally deleted them when cleaning up images from an old project.
That being said, when looking at the logs I have noticed that the functions being triggered by Google Cloud Scheduler are still successfully running on their schedules even though I can no longer access the source code. The functions are logging data the I console within the source code even though it is no longer there.
My question is whether or not these are recoverable and what it would take to find them.
I have tried looking for the images and the buckets to see if they were renamed and I could not find them. I also created a new function in the same region and it spun up a new image and bucket, but it did not contain any reference to the other missing functions.
It is not possible to access the source code of a Google Cloud Function if the bucket that contained the code has been deleted. The source code is stored in the bucket, so if the bucket is deleted, the code is also deleted. If the function is still running, it is because the code has been deployed and is being run from a different location. You can view the logs for the function to see what code is being executed, but you will not be able to retrieve the original source code.
If you need to access the source code for the function, you will need to redeploy the code to a new bucket. You can do this by creating a new bucket and uploading the code, or by using the Cloud Functions API or the gcloud command-line tool to deploy the code to the new bucket.
I intended to write a script for
Changing uploaded file name
Changing file upload folder.
As I am new to Apps Script, I decided to do up 2 separate scripts to test and merge when both are working. I have since gotten both scripts to work as intended but suddenly the auto trigger for on form submit is not working. Throwing the following error.
Exception: Failed to retrieve form data. Please wait and try again.
When I manually run the scripts, it is still working so I assume my coding is correct. I came across an article stating that adding
var form=FormApp.getActiveForm();
will help but it doesn't for my case.
Can anyone help please?
After previously being able to run code workbook scripts, the run button has now been 'greyed out' with a permissions restriction message saying 'No permission to run in output folder' when I hover over the button.
Does anyone know why this has occurred and how to recover permissions to run?
The error indicates that the output dataset that this step in the workbook produces has been moved to a different location (probably a different project) where you don't have write access.
Try viewing the dataset in Compass (the file browser). This might tell you who has most recently edited it, which could help you find the right person to ask why it was moved. You might not be able to do this if you don't still have discoverer access on the output dataset.
Alternatively, ask your permission administrator or IT team for access to the project it has been moved to / for it to be moved back.
I am having problems with script execution from within my company's Google Workspace account.
I am the developer and I have no problem executing any of the scripts with my account; all my scripts run all the way to the end.
Now, there is this one script through which I present the user with a form in a sidebar for him/her to input some data, and then I do some stuff with that data. As mentioned, no problems for me. However, when I try to run it as another person from the company (which isn't just another editor but the superadmin account for the company's Google Workspace), after the initial script permission-granting dialogues are done and dusted, the script only runs halfway through and hangs. It actually gets the sidebar up, allows the user to input data and also to submit some data (I need to check if it submits all of the data). I know for a fact that some of the data does get submitted since one of the things the script does is fill up a particular cell with the data of one of the inputted fields, but it hangs there forever... How could that happen? I thought it might be a problem with the HTMLService, but as some of the inputted data does go through and gets added to the right cell..., I'm at a loss.
Has anyone encountered anything alike?
As it turned out, after I banged my head around for hours, it was a matter of dealing with protected cells.
Even though the script is set to execute as me, as soon as the script attempted to write into a protected cell whenever a different user executed it, and where I had set myself as the only user with write access, it failed.
Thanks go to #Kessy for having a look into it and suggesting a possible way to see the problem.
In the corporate environment with a corporate account I have a Google Document. Think of it as a master document that is being maintained.
I want to add a script to it to create a derived spreadsheet that can be used by people who need a subset of data from the master document.
In the master document I created a script file so the script is bound to the document.
Inside the file I defined a function. Function does some search and processing in the master file without problems but once I try to create or open an existing spreadsheet to extract data from the master document to a derived document the call fails.
I tried several approaches:
SpreadsheetApp.openByUrl();
SpreadsheetApp.create("My test sheet");
and approach covered in the solution
I also tried execution from an installed menu trigger or from debugger - same result.
In all cases I get a pop up with :
Authorization required
{doc name} needs your permission to access your data on Google.
with two buttons to review and cancel.
Clicking review leads to a message "An unexpected error occurred" at the top of the screen.
I tried different machines and browsers and switched V8 engine on and off.
I also made sure that the document is open to all in my org if I try to open an existing doc by URL.
What am I doing wrong?
It turned out that there were two things.
Adding scopes solved the problem.
I had an invalid scope that
was already there (I do not know how it got there, probably from an
example) that I preserved in the manifest and might have misspelled.
That was a mistake. It caused all sorts of instability. Only when I
tried to execute the script in FireFox instead of Chrome was I able
to see a popup that gave me a hint that one of the scopes is invalid
and I need to fix it.
Once I fixed it, everything started to load as expected.