Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 4
Default 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   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 5,441
Default 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   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 1
Default 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   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 5,441
Default 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
Search this Thread:

Advanced Search
Display Modes

Posting Rules

Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On


Similar Threads
Thread Thread Starter Forum Replies Last Post
Electronic signing for an Excel Spreadsheet Lee Bob Excel Discussion (Misc queries) 1 December 5th 05 11:25 AM
Routing and Signing Excel Spreadsheets Bonita Excel Discussion (Misc queries) 0 April 20th 05 09:43 PM
Code-signing certificate problems in Excel 2000 with Windows 2000 Aaron Queenan Excel Programming 0 May 6th 04 11:35 AM
Digital Signing of Macros in Excel 2000 AShemwell Excel Programming 0 September 26th 03 09:42 AM
VBA Code Signing Bruno Guillemette Excel Programming 0 July 25th 03 08:41 PM


All times are GMT +1. The time now is 09:30 AM.

Powered by vBulletin® Copyright ©2000 - 2024, Jelsoft Enterprises Ltd.
Copyright ©2004-2024 ExcelBanter.
The comments are property of their posters.
 

About Us

"It's about Microsoft Excel"