EXCEL files containing VBA - vba

I am trying to put Excel files containing VBA onto my website. I would like the user to be able to view the documents and interact with them, but do not want the documents to download to their desktop. Does anyone know if it is possible to do this?
Thanks

Related

Excel and Sharepoint integration

I can't really find a clear answer or solution for my problem.
What I have is the following: An excel file where a user inputs data in a UserForm and that data is then added to a table in this same excel file. Multiple users will get such an excel file so that they can add data on their own.
What I want to do is to aggregate this data in my own Excel file. Or Sharepoint List. I don't really prefer any option as both would work for me.
The user excel file is done and works. All that is left to do is to send the data in the table to a sharepoint list by clicking a button on the excel file.
I am able to import the excel data to sharepoint just fine, but I want the user to be able to "upload" the data to sharepoint by clicking a button. I did find code for that but it appears to be outdated as some functions are not used in Sharepoint anymore.
Does anyone have a solution or an idea how I can create a button in my excel sheet to send the data from several excel files (each with their own button) to a singular sharepoint/excel file (which would be my file).
I have been looking for days and tried powerapps, sql, acces and other approaches but none worked as they should.
Thanks!

Generate PowerPoint presentations with Excel sheets / charts embedded in it programatically

So what my client wants to accomplish seems pretty simple. We will have PPTX file template with a few Excel sheets embedded in it, and a few charts too.
We have created such template file. We are able to extract it, update excel files that sit in ppt/embedded directory with new ones, and pack it back.
The problem is, the display values of the tables or charts do not update automatically when such file is opened. You have to double click on a spreadsheet table or chart to trigger "edit mode". When you leave it the charts are updated.
We figured that internally, PowerPoint is doing screenshots of tables or charts, and uses it to display presentation. This is probably to allow presentation players that do not come with Excel to correctly render the presentation with embedded sheets.
Is there a way I can programatically update the screenshots of tables/charts? Is there some sort of API from Microsoft that would allow me to do that, like "MS Office API".
Maybe there is some way to have MS office configured/scripted, so I send it a file, it runs a VB script on it and returns updated value? I figured I can actually trigger update to screenshots with VB script. But I don't know if I can orchestrate Office program to do what I want.
Help? :)

Open a .pdf file

I am trying to open a .pdf file within Excel like an iframe in HTML.
My requirement is:
Save the path of multiple PDF files in Excel.
Excel should open each .pdf file within Excel itself (no need to open that in a separate .pdf window).
It should be like iframe in HTML. The user should be able
to view the .pdf within Excel itself.
I know this is little weird, but can anybody help me?
you could probably get the filenames via vba.
here's some that claim to work:
Loop through files in a folder using VBA?
So far as opening a pdf in excel - thats kinda pushing it.
Since your request is exotic I can think of an exotic workaround:
If you can spare the interactivity you can simply make copies and convert your pdfs to word formats to work with them and load them in that way. I've seen people convert pdfs to Jpgs just to load them in some other documents but thats rudimentary and really fringe.
Otherwise you are facing a lot of custom coding that needs to make it possible.

Saving Excel Worksheet as a Read Only PDF File?

I have a report that is built off of an excel macro that is triggered when the file is opened. I use a Windows Scheduled Task to open the file which triggers the macro and then closes the file.
As part of the process within this marco one of the worksheets is saved as PDF file to our network. This file is then linked to through our sharepoint site. It appears that if someone is viewing this pdf and the macro is triggered it doesn't update the PDF File since it is opened. I am handling this error by saving a backup file to a different folder with a different name.
I'm trying to find a good way to work around this. Is there a way to export and save the PDF as read only through the excel vba? Is there a setting in Sharepoint that would make the file open as Read Only?
Any suggestions would be greatly appreciated.
Thanks in advance.

How to Create VBA Add-In with Shared Codes for All Excels?

I'm writing VBA codes for multiple Excel spreadsheets, which will be shared with others from time to time. At some point I find there are lots of duplications in my works. So I want to find a way to share codes in a sort of Excel add-in, like the .xla file.
But when I tried to save the Excel file containing shared codes as .xla file, I got some problems:
The file cannot be edit anymore after I save it in the default add-in folder
If I move the .xls file to a folder other than the add-in folder, and open it directly - I cannot use its classes - which creates problems for sharing the codes
Any ideas to create add-ins in a flexible and powerful way please?
Thanks a lot for the help
Not completely sure this is what you're looking for, but ...
(1) save the .xla/.xlam code by clicking the save icon in the VBA editor. HOWEVER, the thing that saves is the thing currently selected in the Project Explorer pane, which lists all open VB Projects and which is usually on the left. Even if you are staring at your just-edited VBA code, clicking the save icon will not save your code unless it is also selected in the Project Explorer pane. You won't get feedback that anything was saved - but you can verify by checking the file timestamp in a separate window.
(2) if you have an *.xls file which (via the formula bar) refers to VBA functions from your *.xla / *.xlam file, then if you open the *.xls file without opening the .xla,.xlam file first, Excel may create external links to resolve the formulas (i.e. referring to a file which is not open). If you have moved or renamed the *.xla file you can get stuck with those "mangled formulas" and need to edit out the pathname links that Excel inserted using a global substitute. If you arrange to open the .xla,.xlam prior to any *.xls file that uses it, you shouldn't have a problem (e.g. by using the default folder).