excel

Editing Embedded PowerPoint from Excel VBA

I have an embedded PowerPoint presentation in an Excel workbook. How can I edit this (open, copy slides, add data to slides, close) using VBA? ...

How to protect cells in Excel but allow these to be modified by VBA script

I am using Excel where certain fields are allowed for user input and other cells are to be protected. I have used Tools Protect sheet, however after doing this I am not able to change the values in the VBA script. I need to restrict the sheet to stop user input, at the same time allow the VBA code to change the cell values based on certa...

Password hash function for Excel VBA

I need a function written in Excel VBA that will hash passwords using a standard algorithm such as SHA-1. Something with a simple interface like: Public Function CreateHash(Value As String) As String ... End Function The function needs to work on an XP workstation with Excel 2003 installed, but otherwise must use no third party compo...

WinForms in Excel (2002)

Good morning, I am about to start writing an Excel add-in for Excel 2002. The add-in needs to call a form. Obviously, I can write the form within VBA. My question is -- is there an easy/good way of calling a .NET (I am using 3.5) from Excel, and have the form be able to write stuff back to Excel the same way a native Excel 2002 form ...

How do you find Leapyear in VBA?

What is a good implementation of a IsLeapYear function in VBA? Edit: I ran the if-then and the DateSerial implementation with iterations wrapped in a timer, and the DateSerial was quicker on the average by 1-2 ms (5 runs of 300 iterations, with 1 average cell worksheet formula also working). ...

"Clicking" Command Button from other workbook

Hi I am trying to write a macro that would "click" a command button that is in another workbook.. Would that be possible? Without changing any of the code within that other workbook? Thanks a lot! ...

How do you determine Daylight Savings Time in VBA?

What function will let us know whether a date in VBA is in DST or not? ...

How do I get a range's address including the worksheet name, but not the workbook name, in Excel VBA?

If I have a Range object--for example, let's say it refers to cell A1 on a worksheet called Book1. So I know that calling Address() will get me a simple local reference: "$A$1". I know it can also be called as Address(External:=True) to get a reference including the workbook name and worksheet name: "[Book1]Sheet1!$A$1". What I want ...

Best way to do Version Control for MS Excel

What version control systems have you used with MS Excel (2003/2007)? What would you recommend and Why? What limitations have you found with your top rated version control system? To put this in perspective, here are a couple of use cases: 1. version control for VBA modules 2. more than one person is working on a Excel spreadsheet and ...

How can I call a long-running external program from Excel / VBA?

What is the best way to run an external program from excel. It might run for several minutes. What's the best-practice about how to to this. Ideally, A model dialog box that let's the user know that the process is executing. If the executable fails, the user should receive a notification. A timeout should be enforced. A cancel butto...

How to Round in MS Access, VBA

Whats the best way to round in VBA Access? My current method utilizes the Excel method Excel.WorksheetFunction.Round(... But I am looking for a means that does not rely on Excel. ...

Excel CSV - Number cell format

I produce a report as an CSV file. When I try to open the file in Excel, it makes an assumption about the data type based on the contents of the cell, and reformats it accordingly. For example, if the CSV file contains ...,005,... Then Excel shows it as 5. Is there a way to override this and display 005? I would prefer to do somethi...

Tool to convert csv/excel to xml

Hi, As title but would like the flexibility to specify how the output xml file will look like. Any free tool available on windows platform that I can use to achieve that? Thanks ...

Easiest and quickest way of Web enabling old VBA apps

Given an small Excel VBA app (single form, small amount of records saved in single worksheet) that runs quite happily locally on the workstation, what would be the easiest and quickest way of providing the same app on the web? Re-writing the app is an option but I thought it was worth checking if there was a quicker solution out there. ...

How do I prevent Excel from rendering the spreadsheet as my macro calculates it?

My macro updates a large spreadsheet with numbers, but it runs very slowly as excel is rendering the result as it computes it. How do I stop excel from rendering the output until the macro is complete? ...

Send query results to Excel from ASP.NET website

We let users create ad-hoc queries in our website. We would like to have the user select their criteria, then click submit and have the results streamed automatically to Excel. I have the application populating a DataTable, then using the datatable to create a tab delimited string. The problem is getting that to excel. What is the be...

Capturing the Click event in an Excel spreadsheet

How can I capture the event in Excel when a user clicks on a cell. I want to be able to use this event to trigger some code to count how many times the user clicks on several different cells in a column. ...

Use jQuery to send Excel data using AJAX

I have the following function that is pulling data from a database. The ajax call is working correctly. How can I send the tab delimited data in my success function to the user? Setting the contect type to "application/vnd.ms-excel" didn't work. The alert on success shows the correctly formatted data. function SendToExcel() { ...

Generating an Excel file in ASP.NET

I am about to add a section to an ASP.NET app (VB.NET codebehind) that will allow a user to get data returned to them as an Excel file, which I will generate based on database data. While there are several ways of doing this, each has its own drawbacks. How would you return the data? I'm looking for something that's as clean and strai...

Create Excel (.XLS and .XLSX) file from C#

What is the best tool for creating an Excel Spreadsheet with C#. Ideally, I would like open source so I don't have to add any third party dependencies to my code, and I would like to avoid using Excel directly to create the file (using OLE Automation.) The .CSV file solution is easy, and is the current way I am handling this, but I...