Click here to Skip to main content
15,920,217 members
Home / Discussions / C#
   

C#

 
AnswerRe: Detecting Video format Pin
User 665817-Jan-06 4:17
User 665817-Jan-06 4:17 
Questionavoid having this drawing bad effect Pin
Sasuko17-Jan-06 3:51
Sasuko17-Jan-06 3:51 
AnswerRe: avoid having this drawing bad effect Pin
CWIZO17-Jan-06 4:39
CWIZO17-Jan-06 4:39 
QuestionCreate an object instance using System.Type Pin
silverair17-Jan-06 3:02
silverair17-Jan-06 3:02 
AnswerRe: Create an object instance using System.Type Pin
tarasn17-Jan-06 3:09
tarasn17-Jan-06 3:09 
GeneralRe: Create an object instance using System.Type Pin
silverair17-Jan-06 4:37
silverair17-Jan-06 4:37 
GeneralRe: Create an object instance using System.Type Pin
Robert Rohde17-Jan-06 4:57
Robert Rohde17-Jan-06 4:57 
QuestionExcel Macro from C# Pin
pssuresh17-Jan-06 2:39
pssuresh17-Jan-06 2:39 
Hi all,
I am calling excel macro function which is available in excel template file.
I get the reference of the work sheet, and iam trying to calling a macro from C#.The code is as below.

System.Diagnostics.Process[] myProcesses;
Excel.ApplicationClass appInstanceReference;
myProcesses = System.Diagnostics.Process.GetProcessesByName("EXCEL");
if ( myProcesses.Length > 0 )
{
Excel.Workbook xlwkbook = (Excel.Workbook) System.Runtime.InteropServices.Marshal.BindToMoniker(System.Windows.Forms.Application.StartupPath + @"\Templates\CommercialSizing.XLT");
if ( xlwkbook != null )
{
appInstanceReference = (Excel.ApplicationClass) xlwkbook.Application;
if ( appInstanceReference != null)
{
appInstanceReference.GetType().InvokeMember("Run",
System.Reflection.BindingFlags.Default |
System.Reflection.BindingFlags.InvokeMethod,
null, appInstanceReference,new object[]
{"'" + System.Windows.Forms.Application.StartupPath + @"\Templates\CommercialSizing.XLT" + "'!YourMacro"}
);
}
}
}

The problem is, it is not just calling macro function, instead of that, it is opening new excel template and it is calling macro function, but the excel sheet is already opened, i just need to execute my macro.what is the change i need to do in my code.Thanks for your help.
QuestionColor a row in a Datagrid, is there a solution that works with DataView? Pin
Cesa3717-Jan-06 2:28
Cesa3717-Jan-06 2:28 
AnswerRe: Color a row in a Datagrid, is there a solution that works with DataView? Pin
Robert Rohde17-Jan-06 5:01
Robert Rohde17-Jan-06 5:01 
AnswerRe: Color a row in a Datagrid, is there a solution that works with DataView? Pin
Cesa3717-Jan-06 6:46
Cesa3717-Jan-06 6:46 
Questionerror: key already exists Pin
dhol17-Jan-06 2:20
dhol17-Jan-06 2:20 
QuestionIs it possible to create a dialog represent .NET JIT dialog when application error? Pin
god4k17-Jan-06 2:06
god4k17-Jan-06 2:06 
AnswerRe: Is it possible to create a dialog represent .NET JIT dialog when application error? Pin
Judah Gabriel Himango17-Jan-06 5:02
sponsorJudah Gabriel Himango17-Jan-06 5:02 
QuestionConversion to xml Pin
bidisha_tina17-Jan-06 2:03
bidisha_tina17-Jan-06 2:03 
AnswerRe: Conversion to xml Pin
exhaulted17-Jan-06 2:24
exhaulted17-Jan-06 2:24 
AnswerRe: Conversion to xml Pin
User 665817-Jan-06 4:38
User 665817-Jan-06 4:38 
QuestionCapture Icons Pin
Sabry190517-Jan-06 1:16
Sabry190517-Jan-06 1:16 
AnswerRe: Capture Icons Pin
Judah Gabriel Himango17-Jan-06 5:04
sponsorJudah Gabriel Himango17-Jan-06 5:04 
QuestionIterate through linked images in resource file Pin
Tommymo8117-Jan-06 1:10
Tommymo8117-Jan-06 1:10 
AnswerRe: Iterate through linked images in resource file Pin
CWIZO17-Jan-06 1:23
CWIZO17-Jan-06 1:23 
GeneralRe: Iterate through linked images in resource file Pin
Tommymo8117-Jan-06 1:50
Tommymo8117-Jan-06 1:50 
Questionedit the keyboard input stream Pin
Miromann17-Jan-06 1:01
Miromann17-Jan-06 1:01 
AnswerRe: edit the keyboard input stream Pin
DigitalKing17-Jan-06 5:01
DigitalKing17-Jan-06 5:01 
QuestionHow To Prevent Datagrid Row Deletion Pin
Anupbala17-Jan-06 0:54
Anupbala17-Jan-06 0:54 

General General    News News    Suggestion Suggestion    Question Question    Bug Bug    Answer Answer    Joke Joke    Praise Praise    Rant Rant    Admin Admin   

Use Ctrl+Left/Right to switch messages, Ctrl+Up/Down to switch threads, Ctrl+Shift+Left/Right to switch pages.