Home |
Search |
Today's Posts |
#1
Posted to microsoft.public.excel.programming
|
|||
|
|||
Signing VBA code within an Excel spreadsheet from VBA
Hello,
I have a system where I dynamically create XLS files on the fly by automating Excel 2003. The XLS files contain VBA code that is injected, again via automation, and I'd like to know if it is possible to dynamically sign the code too - again on the fly and not by the dialogs. Any help would be much appreciated... Martin |
#2
Posted to microsoft.public.excel.programming
|
|||
|
|||
Signing VBA code within an Excel spreadsheet from VBA
Martin,
I believe that you need to use a template file that is already signed as the basis of your files created on the fly. HTH, Bernie MS Excel MVP "Martin Waller" wrote in message ... Hello, I have a system where I dynamically create XLS files on the fly by automating Excel 2003. The XLS files contain VBA code that is injected, again via automation, and I'd like to know if it is possible to dynamically sign the code too - again on the fly and not by the dialogs. Any help would be much appreciated... Martin |
#3
Posted to microsoft.public.excel.programming
|
|||
|
|||
Signing VBA code within an Excel spreadsheet from VBA
Martin,
I'm sorry to bother you but it looks as if you've already got a solution to something I'm trying to do in MS Excel. I saw the following message on the microsoft.public.excel.programming list. Using MS Access, I have some code that runs a query and then outputs the rows in the result to am MS Excel spreadsheet. I then push a button in MS Excel to launch a macro in my personal.xls file to reformat the data. I add filters via the macro to the columns to enable us to easily look at subsets of the data. I have a little function that I'd like to add to the newly created spreadsheet so that I can produce some totals based on visible cells. Here's the function. =Sum_Visible_Cells(A1:A5) ' where A1:A5 is the range that you want to sum and is placed in a cell in the spreadsheet.. Function Sum_Visible_Cells(Cells_To_Sum As Object) Application.Volatile For Each cell In Cells_To_Sum If cell.Rows.Hidden = False Then If cell.Columns.Hidden = False Then total = total + cell.Value End If End If Next Sum_Visible_Cells = total End Function Based on your question, it looks as if you have figured out how to programmatically add code to a spreadsheet. if this is true, would you object to sharing how you do it? Thank you. Best Regards, Jeff Jones EDS 5109 Deer Lake Trail Wake Forest, NC 27587 n Tue, 31 Aug 2004 13:56:08 +0100, "Martin Waller" wrote: Hello, I have a system where I dynamically create XLS files on the fly by automating Excel 2003. The XLS files contain VBA code that is injected, again via automation, and I'd like to know if it is possible to dynamically sign the code too - again on the fly and not by the dialogs. Any help would be much appreciated... Martin |
#4
Posted to microsoft.public.excel.programming
|
|||
|
|||
Signing VBA code within an Excel spreadsheet from VBA
Jeff,
If you are filtering your values, then simply use =SUBTOTAL(9, A1:A5) which will give the sum of all the visible (not hidden by the filter) cells. HTH, Bernie MS Excel MVP "Jeff Jones" wrote in message ... Martin, I'm sorry to bother you but it looks as if you've already got a solution to something I'm trying to do in MS Excel. I saw the following message on the microsoft.public.excel.programming list. Using MS Access, I have some code that runs a query and then outputs the rows in the result to am MS Excel spreadsheet. I then push a button in MS Excel to launch a macro in my personal.xls file to reformat the data. I add filters via the macro to the columns to enable us to easily look at subsets of the data. I have a little function that I'd like to add to the newly created spreadsheet so that I can produce some totals based on visible cells. Here's the function. =Sum_Visible_Cells(A1:A5) ' where A1:A5 is the range that you want to sum and is placed in a cell in the spreadsheet.. Function Sum_Visible_Cells(Cells_To_Sum As Object) Application.Volatile For Each cell In Cells_To_Sum If cell.Rows.Hidden = False Then If cell.Columns.Hidden = False Then total = total + cell.Value End If End If Next Sum_Visible_Cells = total End Function Based on your question, it looks as if you have figured out how to programmatically add code to a spreadsheet. if this is true, would you object to sharing how you do it? Thank you. Best Regards, Jeff Jones EDS 5109 Deer Lake Trail Wake Forest, NC 27587 n Tue, 31 Aug 2004 13:56:08 +0100, "Martin Waller" wrote: Hello, I have a system where I dynamically create XLS files on the fly by automating Excel 2003. The XLS files contain VBA code that is injected, again via automation, and I'd like to know if it is possible to dynamically sign the code too - again on the fly and not by the dialogs. Any help would be much appreciated... Martin |
Reply |
Thread Tools | Search this Thread |
Display Modes | |
|
|
Similar Threads | ||||
Thread | Forum | |||
Electronic signing for an Excel Spreadsheet | Excel Discussion (Misc queries) | |||
Routing and Signing Excel Spreadsheets | Excel Discussion (Misc queries) | |||
Code-signing certificate problems in Excel 2000 with Windows 2000 | Excel Programming | |||
Digital Signing of Macros in Excel 2000 | Excel Programming | |||
VBA Code Signing | Excel Programming |