Click here to Skip to main content
15,885,216 members
Home / Discussions / C#
   

C#

 
AnswerRe: Illegal characters in path. Pin
Richard MacCutchan4-Aug-10 6:22
mveRichard MacCutchan4-Aug-10 6:22 
GeneralRe: Illegal characters in path. Pin
Vimalsoft(Pty) Ltd4-Aug-10 8:00
professionalVimalsoft(Pty) Ltd4-Aug-10 8:00 
AnswerRe: Illegal characters in path. Pin
DaveyM694-Aug-10 11:58
professionalDaveyM694-Aug-10 11:58 
QuestionBinding Source Issue Pin
spankyleo1234-Aug-10 2:59
spankyleo1234-Aug-10 2:59 
AnswerRe: Binding Source Issue Pin
Ennis Ray Lynch, Jr.4-Aug-10 5:02
Ennis Ray Lynch, Jr.4-Aug-10 5:02 
GeneralRe: Binding Source Issue Pin
spankyleo1234-Aug-10 5:23
spankyleo1234-Aug-10 5:23 
QuestionC#.NET 3.5 Excel 2007 Ribbon Add-in VS 2008 run macro Pin
Wheels0124-Aug-10 2:56
Wheels0124-Aug-10 2:56 
AnswerRe: C#.NET 3.5 Excel 2007 Ribbon Add-in VS 2008 run macro Pin
Wheels0124-Aug-10 8:18
Wheels0124-Aug-10 8:18 
Update - I have the following:
using System; 
using System.Collections.Generic; 
using System.Linq; 
using System.Text; 
using Microsoft.Office.Tools.Ribbon; 
using System.Reflection; 
using Excel = Microsoft.Office.Interop.Excel; 
using Microsoft.Office.Core; 
using System.Windows.Forms; 


namespace ExcelAddInCustomTab 
{ 
public partial class RibbonCustom : OfficeRibbon 
{ 
public RibbonCustom() 
{ 
InitializeComponent(); 
} 

private void btnFileImport_Click(object sender, RibbonControlEventArgs e) 
{ 
Excel.ApplicationClass oExcel = new Excel.ApplicationClass(); 
RunMacro(oExcel, new Object[] { "FileImport" }); 
} 

private void RunMacro(object oApp, object[] oRunArgs) 
{ 
try 
{ 
oApp.GetType().InvokeMember("Run", 
System.Reflection.BindingFlags.Default | 
System.Reflection.BindingFlags.InvokeMethod, 
null, oApp, oRunArgs); 
} 
catch (Exception ex) 
{ 
MessageBox.Show(ex.InnerException.Message); 
} 
} 

} 
} 


In the Excel 2007 spreadsheet, the Import tab shows up with the several buttons I set up. I am getting the following error: The macro may not be available in this workbook, or all macros may be disabled.

I checked all the trusted location and permission settings, and the add-in and macros are not disabled.

WHEELS
QuestionSQL Query string issue Pin
MumbleB4-Aug-10 2:54
MumbleB4-Aug-10 2:54 
AnswerRe: SQL Query string issue Pin
Eddy Vluggen4-Aug-10 3:02
professionalEddy Vluggen4-Aug-10 3:02 
AnswerRe: SQL Query string issue Pin
PIEBALDconsult4-Aug-10 3:10
mvePIEBALDconsult4-Aug-10 3:10 
GeneralRe: SQL Query string issue Pin
MumbleB4-Aug-10 4:35
MumbleB4-Aug-10 4:35 
GeneralRe: SQL Query string issue Pin
Eddy Vluggen4-Aug-10 10:12
professionalEddy Vluggen4-Aug-10 10:12 
GeneralRe: SQL Query string issue Pin
MumbleB4-Aug-10 11:27
MumbleB4-Aug-10 11:27 
GeneralRe: SQL Query string issue Pin
Eddy Vluggen5-Aug-10 0:26
professionalEddy Vluggen5-Aug-10 0:26 
GeneralRe: SQL Query string issue Pin
PIEBALDconsult4-Aug-10 15:39
mvePIEBALDconsult4-Aug-10 15:39 
GeneralRe: SQL Query string issue Pin
MumbleB4-Aug-10 11:30
MumbleB4-Aug-10 11:30 
GeneralRe: SQL Query string issue Pin
PIEBALDconsult4-Aug-10 15:37
mvePIEBALDconsult4-Aug-10 15:37 
GeneralRe: SQL Query string issue Pin
MumbleB10-Aug-10 6:28
MumbleB10-Aug-10 6:28 
GeneralRe: SQL Query string issue Pin
PIEBALDconsult10-Aug-10 14:39
mvePIEBALDconsult10-Aug-10 14:39 
QuestionSave DataGridView changes to database through multiple layers Pin
anthasaurus4-Aug-10 0:45
anthasaurus4-Aug-10 0:45 
AnswerRe: Save DataGridView changes to database through multiple layers Pin
Luc Pattyn4-Aug-10 1:45
sitebuilderLuc Pattyn4-Aug-10 1:45 
GeneralRe: Save DataGridView changes to database through multiple layers Pin
anthasaurus4-Aug-10 1:51
anthasaurus4-Aug-10 1:51 
QuestionWindows Form (C#.net) Pin
onecomputerguy4-Aug-10 0:36
onecomputerguy4-Aug-10 0:36 
AnswerRe: Windows Form (C#.net) Pin
OriginalGriff4-Aug-10 1:04
mveOriginalGriff4-Aug-10 1:04 

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.