How to Get Reference of CommandBar in Excel?

hi!

i am using VC7 and Office 2003. I want to add a toolbar in EXCEL with some
buttons. i have done that for word already. First i get the reference of the
CommandBar using the following code.

HRESULT hr;

CComPtr<Office2003::_CommandBars> spCmdBars;

//QI() for application.

CComQIPtr<MSWord::_Application> spWordApp(m_pApplication);

ATLASSERT(spWordApp);

m_pWordApp = spWordApp;

hr = m_pWordApp->get_CommandBars(&spCmdBars);

 so now when i try to do the same with Excel i receive an error message that
get_CommandBars is not member of m_pExcelApp.

i don't know how to do that.

so if any body knows about that then please help me. i m in hurry.

Thanks.

Ahmad Jalil Qarshi


0
3/8/2005 8:15:54 AM
excel 39879 articles. 2 followers. Follow

0 Replies
668 Views

Similar Articles

[PageSpeed] 36

Reply:

Similar Artilces:

How do I set up inches per Minute/Second in Excel
I need to know how to take a known inch per Minute and divide by a known measurement and displayed as minutes and seconds. The answer of the equation (minutes and seconds) is where I'm having trouble. Actually, you need to divide your measured length by the known rate (inches per minute). This gives you the number of minutes, but to display using m:ss format you need to divide by 1440, the number of minutes per day (since Excel counts time as the fraction of a day). So put your measurement in A2, your rate in B2, and this formula into C2: =A2/B2/1440 Then format C2 using a custom...

Awesome list of Excel/Word/Powerpoint shortcuts!
Hi, everybody! I recently discovered a great keyboard shortcut list for the office applications. It seems to have practically every shortcut imaginable and it fits on one page too! I printed it out and put on the wall next to my monitor -- just great!. Thought you would appreciate it... Here's the link to the PDF file. Hit print and you're ready to go. http://www.prihodko.com/msoffice/Office_2003_Shortcuts.pdf Lindy Hi Lindy, For Excel, I like Chip Pearson's Excel Keyboard Shortcuts page at: http://www.cpearson.com/excel/KeyboardShortcuts.htm There is also a d...

Excel Functions #2
hi guys, just wondered if anyone knew which function i would use to do this, because im fairly novice with excel: Basically if the cell value is above 110 i want the cell to turn green if the cell value is between 110 and 105 i want it to turn yellow if the cell value is below 105 i want it to turn red any help would be seriously appreciated. thanks spotseven wrote: > hi guys, just wondered if anyone knew which function i would use to > do this, because im fairly novice with excel: > > Basically if the cell value is above 110 i want the cell to turn gr...

How do I delete a text box from an Excel spreadsheet?
Rightclick on it and select cut If the textbox is from the control toolbox toolbar, you may have to click on the designmode icon first. Uncle Binky wrote: -- Dave Peterson ...

Using insert to paste a row--how done in Excel 2007
Hi, In my old version of Excel, I could copy a row or chunk of rows, move to a new spot and use the "insert row" icon to insert the rows and paste it automatically. Now in Office 2007 it just inserts a row instead of what I have copied. I want it the old way! How do I do it? -- Thanks, PTweety R-click, Insert Copied Cells. pickytweety wrote: > Hi, > In my old version of Excel, I could copy a row or chunk of rows, move to a > new spot and use the "insert row" icon to insert the rows and paste it > automatically. Now in Office 2007 it just inserts a r...

How do I get an item's rank?
Hi, Let's say I have 10 merchants selling the same product at different prices. How do I get a vendor's ranking? I'd be passing the stored procedure ProductID and VendorID. And the data comes from a table with three columns ProductID, VendorID, Price where the Price field is smallmoney. -- Thanks, Sam Something like With RankedVendors As (Select ProductID, VendorID, Price, Row_Number() Over (Order By Price) As Rank From <YourTable> Where ProductID = <product you are looking for>) Select ProductID, VendorID, Price, Rank From RankedVendors ...

mailboxes are getting larger on Exchange Server
Dear all, I ve a problem in my exchange server 2003. * The mailboxes are getting larger and although i m delvering the mails to PST files *Many mailboxes shows that they r above the limit "mailbox disabled" .... i m using a quata for the mailboxes. and by browsing the mailbox i dont c any thing in the mail box from the user's side ... the only solution is to expand the its quota then it returns to normale stauts very strange!! Note: I m taking backup every day "the normal backup size was 17 GB after that its 65 GB" *It only took one day to get to the 65...

I keep getting and error on start of Office x.v
I just purchased Office X.v and installed it onto my Mac. I also removed Office Test Drive before installing the full Office X.v, but i didn't empty my trash. So after I installed the full version i keep getting the error "An unexpected error occurred while trying to load Microsoft Framework X library" on all office programs. I read on mactopia that this could be caused by "lock" identities in the microsoft identity file, but all of mine are unlocked. When i tried to empty my trash, it would not empty a few microsoft file because it says they are in use. Framework ...

Can I make a database in Word with Excel Data
I know this may be a "DUH" question, but... I am making a list of area dentists that I have copied and pasted of of the Dex website into Excel. I am wondering if I can take this inf and make a database in Word for printing address labels. Does anyon know if this can be done, and HOW?:confused -- Myn77 ----------------------------------------------------------------------- Myn777's Profile: http://www.excelforum.com/member.php?action=getinfo&userid=2958 View this thread: http://www.excelforum.com/showthread.php?threadid=49283 For help on Word mail merge using Excel as the...

Opening tab-delimited files in Excel... how to stop the autoformat of dates?
Hello, I'm doing bioinformatics work in which I often download tab-delimited files describing genomes and open them in Excel. Unfortunately, Excel decides that genes with names like APR1 and SEP7 are actually dates, and reformats them as such. This is a huge headache, as I often don't notice these problems until much later. Is there anyway to completely disable this date autoformatting? I've searched high and low and have yet to find a solution. Thanks! P.S. I'm using Excel 2002 -- salamander ------------------------------------------------------------------------ sa...

Saving Excel workbook in SQL server using c#
Could anyone please help me out as to how we can save the excel workbook in the database and read it back. I was able to convert the text files and image files into binary format and save them to the DB and finally able to retrive them back in the same format. But was unable to do same for the excel object. Your help will be greatly appreciated. Thanks, regards, jitender ...

Excel's localization of scientific notation
Does Excel use "E+" and "E-" for scientific notation for all locales? Or are there some locales for which it uses different characters? Thanks, Greg I'm pretty sure that the E is universal. If it were not, it would have been in the list of international symbols. Look here for more info about international issues: http://www.rondebruin.nl/international.htm#strings -- Kind regards, Niek Otten Microsoft MVP - Excel "Greg Lovern" <gregl@gregl.net> wrote in message news:82e5afbe-a4ba-4f5f-ac41-ac7b41519d67@h40g2000prf.googl...

2003 excel
I would like to change the cell color if there is a "r" found in it. All the cells are in the same colum and there are also numbers in the cells with the "r". Can anyone help ? Assume data in col A Select the col, then apply conditional formatting using Formula Is: =ISNUMBER(SEARCH("r",A1)) Format to taste > OK out Replace SEARCH with FIND if you need it to be case sensitive -- Max Singapore http://savefile.com/projects/236895 Downloads:16,400 Files:356 Subscribers:53 xdemechanik --- "Dave" wrote: > I would like to change the cell color if ...

How do I alpha my mailing list in Microsoft excel and delete names
To alphabetize -- use sort Sorting, Some notes on sorting in Excel http://www.mvps.org/dmcritchie/excel/sorting.htm To delete rows pick a range of rows by selecting one or more contiguous row number(s) then Edit, Delete rows You might also be interested in Filtering to expose only names in Ohio You can use Filtering to permanently delete rows or just hide them. you can read more about filtering at http://www.contextures.com/tiptech.html If you want to print labels for your mailing list, you do the printing in MS Word with Excel acting as your data bas...

Access ODBC problem: Excel cannot get float columns
I need some help I'm trying to get Access external data from an Excel workbook, using the MS Query feature. Everything is ok except when I try to fetch some tables that ODBC refuses to get data from. The error message tells that the MS Access ODBC driver doesn't allow some columns to be transmited because of its number of characters. The most strange thing is that I can see the data from MS Query correctly, but I caannot get it back from Excel. After some tries, I thing it occurs only with real typed columns. Can anybody help me? I use Windows XP Home + Office 2000 spanish versio...

HELP: Excel userform version control issue
Hi All, I have an excel userform that is posted on my companys intranet. The issue I am having is, users are saving this form to their hard drive and then using it(Instead of launching it everytime from intranet), SO basically when I have a new version of form on intranet they still use the old version as they have a habbit of saving it on their hard drive. Is there a way to resove this? something like they would see a popup message saying that "This is an older version that you are using, Please launch the form from Intranet for newer version". Thanks in advan...

How do I get special symbols for correct sign?
...

how to get a fixed window with caption?
hi! which is the best way to get a window (dialog box) with captionbar but no posibility for the user to move the window? thanks philipp Try overriding the WM_WINDOWPOSCHANGING message to prevent the move before it happens. >-----Original Message----- >hi! > >which is the best way to get a window (dialog box) with captionbar but no >posibility for the user to move the window? > >thanks philipp > > >. > ...

can't get scrollbar to come up -- CScrollView
I am new to MFC and I am trying to get a simple app working with a scrollable view. I have put in the call to SetScrollSizes in the OnInitialUpdate method. I'm still not quite sure what sizeTotal is supposed to do. I just gave it a value of 5 for the y for now, which I think I want to set to the number of lines of text I have to display. And then I set y to 50. int numLines = 5; CSize sizeTotal; sizeTotal.cy = numLines; sizeTotal.cx = 50; SetScrollSizes( MM_TEXT, sizeTotal); In the OnDraw method, I put in code to draw my text on the view using the device context. The text get...

Error in code exportin tables to excel
I'm tryin to export a table to excel with the code: Private Sub Command4_Click() On Error GoTo Err_Command0_Click Dim stDocName As String stDocName = "F01_UT" DoCmd.TransferSpreadsheet acExport, acSpreadsheetTypeExcel9, F01_UT, "C:\TRY\Tbls", True Exit_Command0_Click: Exit Sub Err_Command0_Click: MsgBox Err.Description Resume Exit_Command0_Click End Sub However, Access displays the message: Compile error : Syntax error What I'm doing wrong? If I want to export more tablas do I have to write more lines (DoCmd.TransferSpreadsheet acExport, acSpr...

Newbie: can't get a calculated value on the form?
I have a table with numbers and a form that shows the numbers. I have a query that takes one of the numbers and mulitplies it. I put a text box on the form from the query result field, but I get a "#Name" error instead of the result. When I run the query, I get the correct result. Help, please? Ed "Ed from AZ" <prof_ofwhat@yahoo.com> wrote in message news:d1e7d27c-11d9-4696-8d19-4c5fdd9dbb89@d70g2000hsb.googlegroups.com... >I have a table with numbers and a form that shows the numbers. I have > a query that takes one of the numbers and mulitplies it. I p...

Invalid References in formula
Hi, I got this error message when i close my workbook: "A formula in this worksheet contains one or more invalid references. Verify that your formulas contain a valid path, workbook, range name and cell reference." The funny thing is that this error message pop out only when i save and close the workbook on certain worksheets. E.g. I have worksheet a, b, c and d. When i am either on sheet a and d, i saved the file and close the book at that sheet, the error message did not pop out. However when I performed similar actions on either of the other 2 sheets, the error m...

Create a new instance of a class that is a reference
Hi all, I am trying to make a class that when you create a 2nd instance the second instance will be a reference to the first. Public Class ClassA Private Shared tableList As Hashtable Public myInt as integer = 0 Public Sub New() MyBase.New() InitializeValues() End Sub Private Function openTable() As Boolean If (tableList Is Nothing) Then tableList = New Hashtable() End If If (tableList.ContainsKey(TABLE)) Then SetReference(Me, tableList(TABLE)) OpenCount += 1 Else ...

emailing spreadsheet within excel
I have a user that has sent her spreadsheet as an attachment using the Send To Function. We use Outlook. Now, it seems as if the Send To option has lost its settings and is now trying to set up an Internet account instead of using the Microsoft Exchange Settings. Anyone know how to reset the Send To settings in Excel? Thanks! ...

How do I import data from a SECURED website into Excel?
I can import data from a regular web page directly into Excel spreadsheet, but when I tried importing them from a secured site I encountered problems. Does anyone have any suggestions? ...