Cell context menu in XL2007

As I understand from various postings in this forum, we can not create
any custom toolbars or icons in xl2007.
But Is it possible to add custom icon to run a macro in cell context
menu (cell right click menu) by a add-in in VB6?
If yes pl point me to a sample code if available.

I am trying to make com addin in vb6 with help of example on Chip's
site and need to provide a button in rightclick menu to users for
accessing the code.

Regards,
Madiya
0
Madiya
5/4/2010 6:55:09 AM
excel.programming 6508 articles. 2 followers. Follow

5 Replies
1111 Views

Similar Articles

[PageSpeed] 40

See this page for example code
http://www.ozgrid.com/VBA/right-click.htm



-- 
Regards
Dave Hawley
www.ozgrid.com
"Madiya" <madiya122@yahoo.co.uk> wrote in message 
news:4e2758e2-0f5d-4099-8308-63cd87bfbb2f@40g2000pry.googlegroups.com...
> As I understand from various postings in this forum, we can not create
> any custom toolbars or icons in xl2007.
> But Is it possible to add custom icon to run a macro in cell context
> menu (cell right click menu) by a add-in in VB6?
> If yes pl point me to a sample code if available.
>
> I am trying to make com addin in vb6 with help of example on Chip's
> site and need to provide a button in rightclick menu to users for
> accessing the code.
>
> Regards,
> Madiya 

0
ozgrid
5/4/2010 7:07:21 AM
On May 4, 12:07=A0pm, "ozgrid.com" <d...@ozgrid.com> wrote:
> See this page for example codehttp://www.ozgrid.com/VBA/right-click.htm
>
> --
> Regards
> Dave Hawleywww.ozgrid.com"Madiya" <madiya...@yahoo.co.uk> wrote in messag=
e
>
> news:4e2758e2-0f5d-4099-8308-63cd87bfbb2f@40g2000pry.googlegroups.com...
>
>
>
> > As I understand from various postings in this forum, we can not create
> > any custom toolbars or icons in xl2007.
> > But Is it possible to add custom icon to run a macro in cell context
> > menu (cell right click menu) by a add-in in VB6?
> > If yes pl point me to a sample code if available.
>
> > I am trying to make com addin in vb6 with help of example on Chip's
> > site and need to provide a button in rightclick menu to users for
> > accessing the code.
>
> > Regards,
> > Madiya- Hide quoted text -
>
> - Show quoted text -

Well, Thanks.
I know this part of code.
I requested sample code for use in com add-in.
I have tried saveral combinations but com add-in is not creating the
custom button in the cell right click menu.
However, all the functions in the same add-in  as provided by chip
works fine.

Regards,
Madiya
0
Madiya
5/4/2010 9:25:56 AM
Madiya,

Can you post the COM addin code, just the necessary implementation code and 
the menu code?

-- 

HTH

Bob

"Madiya" <madiya122@yahoo.co.uk> wrote in message 
news:38741129-2167-4e71-95a1-7c1713010a8c@42g2000prb.googlegroups.com...
On May 4, 12:07 pm, "ozgrid.com" <d...@ozgrid.com> wrote:
> See this page for example codehttp://www.ozgrid.com/VBA/right-click.htm
>
> --
> Regards
> Dave Hawleywww.ozgrid.com"Madiya" <madiya...@yahoo.co.uk> wrote in message
>
> news:4e2758e2-0f5d-4099-8308-63cd87bfbb2f@40g2000pry.googlegroups.com...
>
>
>
> > As I understand from various postings in this forum, we can not create
> > any custom toolbars or icons in xl2007.
> > But Is it possible to add custom icon to run a macro in cell context
> > menu (cell right click menu) by a add-in in VB6?
> > If yes pl point me to a sample code if available.
>
> > I am trying to make com addin in vb6 with help of example on Chip's
> > site and need to provide a button in rightclick menu to users for
> > accessing the code.
>
> > Regards,
> > Madiya- Hide quoted text -
>
> - Show quoted text -

Well, Thanks.
I know this part of code.
I requested sample code for use in com add-in.
I have tried saveral combinations but com add-in is not creating the
custom button in the cell right click menu.
However, all the functions in the same add-in  as provided by chip
works fine.

Regards,
Madiya 


0
Bob
5/4/2010 9:34:39 AM
On May 4, 2:34=A0pm, "Bob Phillips" <bob.phill...@somewhere.com> wrote:
> Madiya,
>
> Can you post the COM addin code, just the necessary implementation code a=
nd
> the menu code?
>
> --
>
> HTH
>
> Bob
>
> "Madiya" <madiya...@yahoo.co.uk> wrote in message
>
> news:38741129-2167-4e71-95a1-7c1713010a8c@42g2000prb.googlegroups.com...
> On May 4, 12:07 pm, "ozgrid.com" <d...@ozgrid.com> wrote:
>
>
>
>
>
> > See this page for example codehttp://www.ozgrid.com/VBA/right-click.htm
>
> > --
> > Regards
> > Dave Hawleywww.ozgrid.com"Madiya" <madiya...@yahoo.co.uk> wrote in mess=
age
>
> >news:4e2758e2-0f5d-4099-8308-63cd87bfbb2f@40g2000pry.googlegroups.com...
>
> > > As I understand from various postings in this forum, we can not creat=
e
> > > any custom toolbars or icons in xl2007.
> > > But Is it possible to add custom icon to run a macro in cell context
> > > menu (cell right click menu) by a add-in in VB6?
> > > If yes pl point me to a sample code if available.
>
> > > I am trying to make com addin in vb6 with help of example on Chip's
> > > site and need to provide a button in rightclick menu to users for
> > > accessing the code.
>
> > > Regards,
> > > Madiya- Hide quoted text -
>
> > - Show quoted text -
>
> Well, Thanks.
> I know this part of code.
> I requested sample code for use in com add-in.
> I have tried saveral combinations but com add-in is not creating the
> custom button in the cell right click menu.
> However, all the functions in the same add-in =A0as provided by chip
> works fine.
>
> Regards,
> Madiya- Hide quoted text -
>
> - Show quoted text -

Sure. Here it is.

Connectexcel class module :
'FROM
'http://www.cpearson.com/Excel/CreatingCOMAddIn.aspx

'REFERANCES REQUIRED FOR THIS ADDIN
'C:\Program Files\Common Files\microsoft shared\OFFICE11\MSO.DLL
'C:\Program Files\Office2003\OFFICE11\EXCEL.EXE
'C:\Program Files\Common Files\Designer\MSADDNDR.DLL

Option Explicit
Implements AddInDesignerObjects.IDTExtensibility2


Private Sub IDTExtensibility2_OnAddInsUpdate(custom() As Variant)
' not used but required by Implements.
End Sub

Private Sub IDTExtensibility2_OnBeginShutdown(custom() As Variant)
' not used but required by Implements.
End Sub

Private Sub IDTExtensibility2_OnConnection(ByVal Application As
Object, _
    ByVal ConnectMode As AddInDesignerObjects.ext_ConnectMode, _
    ByVal AddInInst As Object, custom() As Variant)
    ''''''''''''''''''''''''''''''
    ' Called automaticaly when Excel loads the CAI.
    ''''''''''''''''''''''''''''''
    Set XL =3D Application
    Set ThisCAI =3D AddInInst
    Set ExcelEvents =3D New CExcelEvents
End Sub

Private Sub IDTExtensibility2_OnDisconnection(ByVal RemoveMode As
AddInDesignerObjects.ext_DisconnectMode, custom() As Variant)
    ''''''''''''''''''''''''''''''
    ' Called automaticaly when Excel unloads the CAI.
    ''''''''''''''''''''''''''''''
    Set XL =3D Nothing
    Set ThisCAI =3D Nothing
    Set ExcelEvents =3D Nothing
End Sub

Private Sub IDTExtensibility2_OnStartupComplete(custom() As Variant)
' not used but required by Implements.
End Sub

In Cexcelevents class module ;
Private Sub SetupControls()
    ''''''''''''''''''''''''''''''''''''''''''''''''''''
    ' Setup one control. Repeat this code for all other
    ' user interface elements.
    ''''''''''''''''''''''''''''''''''''''''''''''''''''

'Set pMenuItem1 =3D XLApp.CommandBars("CELL").Controls.Add( _
'        Type:=3DmsoControlButton, Temporary:=3DTrue)
With XLApp.CommandBars("Cell").Controls.Add
       With .Add(Temporary:=3DTrue)
        'With pMenuItem1
        .Caption =3D "excel GSM"
        .OnAction =3D "excel GSM"
        .Tag =3D excelGSM
        '.BeginGroup =3D True
    End With
End With
pControlsColl.Add pMenuItem1

End Sub

Private Sub pMenuItem1_Click(ByVal Ctrl As Office.CommandBarButton,
CancelDefault As Boolean)
    MsgBox "Menu Item Click From Excel COM Add In"
End Sub
0
Madiya
5/4/2010 9:48:51 AM
On May 4, 2:48=A0pm, Madiya <madiya...@yahoo.co.uk> wrote:
> On May 4, 2:34=A0pm, "Bob Phillips" <bob.phill...@somewhere.com> wrote:
>
>
>
>
>
> > Madiya,
>
> > Can you post the COM addin code, just the necessary implementation code=
 and
> > the menu code?
>
> > --
>
> > HTH
>
> > Bob
>
> > "Madiya" <madiya...@yahoo.co.uk> wrote in message
>
> >news:38741129-2167-4e71-95a1-7c1713010a8c@42g2000prb.googlegroups.com...
> > On May 4, 12:07 pm, "ozgrid.com" <d...@ozgrid.com> wrote:
>
> > > See this page for example codehttp://www.ozgrid.com/VBA/right-click.h=
tm
>
> > > --
> > > Regards
> > > Dave Hawleywww.ozgrid.com"Madiya" <madiya...@yahoo.co.uk> wrote in me=
ssage
>
> > >news:4e2758e2-0f5d-4099-8308-63cd87bfbb2f@40g2000pry.googlegroups.com.=
...
>
> > > > As I understand from various postings in this forum, we can not cre=
ate
> > > > any custom toolbars or icons in xl2007.
> > > > But Is it possible to add custom icon to run a macro in cell contex=
t
> > > > menu (cell right click menu) by a add-in in VB6?
> > > > If yes pl point me to a sample code if available.
>
> > > > I am trying to make com addin in vb6 with help of example on Chip's
> > > > site and need to provide a button in rightclick menu to users for
> > > > accessing the code.
>
> > > > Regards,
> > > > Madiya- Hide quoted text -
>
> > > - Show quoted text -
>
> > Well, Thanks.
> > I know this part of code.
> > I requested sample code for use in com add-in.
> > I have tried saveral combinations but com add-in is not creating the
> > custom button in the cell right click menu.
> > However, all the functions in the same add-in =A0as provided by chip
> > works fine.
>
> > Regards,
> > Madiya- Hide quoted text -
>
> > - Show quoted text -
>
> Sure. Here it is.
>
> Connectexcel class module :
> 'FROM
> 'http://www.cpearson.com/Excel/CreatingCOMAddIn.aspx
>
> 'REFERANCES REQUIRED FOR THIS ADDIN
> 'C:\Program Files\Common Files\microsoft shared\OFFICE11\MSO.DLL
> 'C:\Program Files\Office2003\OFFICE11\EXCEL.EXE
> 'C:\Program Files\Common Files\Designer\MSADDNDR.DLL
>
> Option Explicit
> Implements AddInDesignerObjects.IDTExtensibility2
>
> Private Sub IDTExtensibility2_OnAddInsUpdate(custom() As Variant)
> ' not used but required by Implements.
> End Sub
>
> Private Sub IDTExtensibility2_OnBeginShutdown(custom() As Variant)
> ' not used but required by Implements.
> End Sub
>
> Private Sub IDTExtensibility2_OnConnection(ByVal Application As
> Object, _
> =A0 =A0 ByVal ConnectMode As AddInDesignerObjects.ext_ConnectMode, _
> =A0 =A0 ByVal AddInInst As Object, custom() As Variant)
> =A0 =A0 ''''''''''''''''''''''''''''''
> =A0 =A0 ' Called automaticaly when Excel loads the CAI.
> =A0 =A0 ''''''''''''''''''''''''''''''
> =A0 =A0 Set XL =3D Application
> =A0 =A0 Set ThisCAI =3D AddInInst
> =A0 =A0 Set ExcelEvents =3D New CExcelEvents
> End Sub
>
> Private Sub IDTExtensibility2_OnDisconnection(ByVal RemoveMode As
> AddInDesignerObjects.ext_DisconnectMode, custom() As Variant)
> =A0 =A0 ''''''''''''''''''''''''''''''
> =A0 =A0 ' Called automaticaly when Excel unloads the CAI.
> =A0 =A0 ''''''''''''''''''''''''''''''
> =A0 =A0 Set XL =3D Nothing
> =A0 =A0 Set ThisCAI =3D Nothing
> =A0 =A0 Set ExcelEvents =3D Nothing
> End Sub
>
> Private Sub IDTExtensibility2_OnStartupComplete(custom() As Variant)
> ' not used but required by Implements.
> End Sub
>
> In Cexcelevents class module ;
> Private Sub SetupControls()
> =A0 =A0 ''''''''''''''''''''''''''''''''''''''''''''''''''''
> =A0 =A0 ' Setup one control. Repeat this code for all other
> =A0 =A0 ' user interface elements.
> =A0 =A0 ''''''''''''''''''''''''''''''''''''''''''''''''''''
>
> 'Set pMenuItem1 =3D XLApp.CommandBars("CELL").Controls.Add( _
> ' =A0 =A0 =A0 =A0Type:=3DmsoControlButton, Temporary:=3DTrue)
> With XLApp.CommandBars("Cell").Controls.Add
> =A0 =A0 =A0 =A0With .Add(Temporary:=3DTrue)
> =A0 =A0 =A0 =A0 'With pMenuItem1
> =A0 =A0 =A0 =A0 .Caption =3D "excel GSM"
> =A0 =A0 =A0 =A0 .OnAction =3D "excel GSM"
> =A0 =A0 =A0 =A0 .Tag =3D excelGSM
> =A0 =A0 =A0 =A0 '.BeginGroup =3D True
> =A0 =A0 End With
> End With
> pControlsColl.Add pMenuItem1
>
> End Sub
>
> Private Sub pMenuItem1_Click(ByVal Ctrl As Office.CommandBarButton,
> CancelDefault As Boolean)
> =A0 =A0 MsgBox "Menu Item Click From Excel COM Add In"
> End Sub- Hide quoted text -
>
> - Show quoted text -

Pl help.
Madiya
0
Madiya
5/6/2010 6:10:51 AM
Reply:

Similar Artilces:

coloured cells #2
Hi, I have a user that created a spreadsheet that is highlighted by colours in different cells. On his home computer he can see the colours but at work the spreadsheet becomes pure black and white. If he prints the spreadsheet at work, it is in colour. He used to see the colours on the screen at work also. He is using Excel 2002. Any ideas? Joyce Look if he has set this Click Start, click Control Panel, and then click Accessibility Options. Click the Display tab, and then click to clear the Use High Contrast check box. Click OK to close the Accessibility Options dialog box. -- ...

tasks to cell phone
How can I use exchange to send tasks to cell phone. I want to do when f.e. this phone is away from the office. This is PDA phone. On 14 Dec 2005 11:38:11 -0800, "Filip - beginner" <fwitkowski@gmail.com> wrote: >How can I use exchange to send tasks to cell phone. I want to do when >f.e. >this phone is away from the office. This is PDA phone. If you're using a Smartphone you can sync tasks already with ActiveSync. "Mark Arnold [MVP]" <mark@mvps.org> wrote: >On 14 Dec 2005 11:38:11 -0800, "Filip - beginner" ><fwitkowski@gmail...

sorting error on non-merged cells
Excel 2002, WinXp Home My spreadsheet has columns for Number, Date, Text, etc. When I select a column to sort, Excel expands the selection to include all cells (as it should). When I try to sort I get the error message about merged cells having to be the same size. I looked at KB291063 but that doesn't help. The cels are NOT merged so why do they have to be the same size? What size is the error refering to (# of characters, absolute value, ?)? How do I un-merge non-merged cells so I can sort? Firstly I would never rely on Excel to expand a selection to include the data I wa...

Formatting text in a cell
Is there a way to key text in one cell that is multiple lines? We would like to be able to insert new lines where we want them. Thanks for the help!! -- akkrug Use the Formula Bar: 1. click in the formula bar 2. in the formula bar, move the cursor to the desired point of insertion 3. touch ALT-ENTER 4. enter the new line. -- Gary''s Student - gsnu200855 "akkrug" wrote: > Is there a way to key text in one cell that is multiple lines? We would like > to be able to insert new lines where we want them. > > > Thanks for the help!! > -- > ak...

Finding combinations of cells that sum to near a value
Starting with a column of ~30 numbers, I'm looking for a way to have Excel find all combinations that sum to a target value +/- a specified range width. (For example, I may be looking for all combinations that sum to 1000 +/- 10.) I've found some code from Tushar Mehta that finds a list of all possible matches that sum to a number, but it doesn't allow me to put in a range to find sums to within a delta of this value. I tried modifying the code to add this in, but I couldn't get it to work right. Here is the code: http://www.tushar-mehta.com/excel/templates/match_values/index....

separating multiples digit in a cell into individual cell
I have a series of number sets. When I copied from the MS Word and pasted them into Excel, all of the numbers in the set are pasted into one cell. I need those numbers to be in an individual cell. How do I do it? I think MS Excel 2003 was able to do it. I currently have Excel 2007. Please help. Thank you very much. EggHeadCafe - Software Developer Portal of Choice A Wrapper for the Dispatcher class of Threading Namespace to manage thread items http://www.eggheadcafe.com/tutorials/aspnet/bce7889e-d2cf-42b8-a6af-2f01a383cff6/a-wrapper-for-the-dispatc.aspx Hi, You may use Data >...

Too many different cell formats #6
I am running into the error message: Too many different cell formats Is there a solution to lowering the number of formats I am using? Just trying to change them to make some consistent gives me the same error message. I tried running the search on the forums on my topic but they have been disabled for a Microsoft upgrade. Thanks! One idea - Rob Bovey's excellent Utilities add-in will list all the formats in use in your workbook, allowing you to manually delete what isn't being used. http://www.appspro.com/Utilities/ExcelUtilities.htm You can also see the source code for ...

cell in cell formulation possible???
Let's say I have a string of text in a cell, something like: "We may charge you $XXX fee if item is not returned in good condition." Is it possible to make that XXX a formula/calculation (based upon information entered in another cell)? ="We may charge you $" & format(A1,"#,##0.00") & " fee if item is not returned in good condition." HTH, Gary Brown "Abi" wrote: > Let's say I have a string of text in a cell, something like: > > "We may charge you $XXX fee if item is not returned in good condition." &g...

Do Not Want to count blank Cells
I copy pasted an Access dynaset (e.g., results of a crosstab query) into an Excel spreadsheet. I tried to use the function =counta(a4:z4) to count the number of entries (nonblank) in row 4. But the result is giving me 26 because it is counting blank cells. Is there a way to count the entries without counting the blanks or a way to easily reformat or change the blank cells so the formula will not count the blanks. I do not want to have to manually delete every blank cell in a table 26 columns by 2000 rows. Thank you, Steve CountA does what you want. It seems that you must have s...

the menu bar is hidden under the title bar in a frame window generated from a dll ...
Hi, A very simple frame window generated from a dll of mine always has its menu bar hidden under the title bar. I have to click on the title bar to make the menu items show up. The following code that generates the frame window is actually copied from a small test program to the dll. In the test program, the code works just fine. So what makes the difference? I suspect IDR_MENU_TEST is only partially successfully loaded in the dll. Any reason for it? Pleave provide me any clue and hint. Your help is much appreciated. (I am using VS 2005) C2DGraphDoc *pDoc = new C2DGraphDoc...

How to matching substring from a Cell
Dear Sir/Madam, I am now having a column likes below Column A My Name is David Chan Marry David Williams He is David and is a boy I want to find out Column A cells with contact the word "David', then display "T" on Coloum B if found or "F" is not found. The result should be as following: Column A Column B My Name is David Chan T Marry F David Williams T He is David and is a boy T How can I do it ? I have tried if( ), but it only match the c...

moving cells
I have a roster with 30 names on a fixed schedule for 15 weeks i want to move the names through the schedule. Thanks Hi Paul, I would try an Excel web search on your Google toolbar or at http://www.google.com/advanced_search?hl=en for excel rotation OR rota schedule OR timesheets and a Google Groups search on a dropdown on your Google toolbar or at http://groups.google.com/grphp?hl=en&tab=wg&q= rotation OR rota schedule OR timesheets group:*excel* to get you started then ask specific questions if that does not provide enough information. --- HTH, D...

Attaching Comment to cell contents rather than cell
I have a spreadsheet that is regularly upadated overwriting columns, however I need to enter comments on the sheet referenced on the content. The next time I update the sheet the referenced cell will move down a row, but I need the comment to stay with the content rather than the cell. Any suggestions? Many thanks If the values that you're commenting are unique, you may want to toss the comments and create a table in another worksheet. Value Comment Then use an =vlookup() formula to return the "comment" to the adjacent cell. El Damo wrote: > > I have a spreadsh...

Pause and Input to cell
Help, Back in a Lotus 1-2-3 macro we could use the command {?} to pause for input, then the macro would place the input data in a cell, let's say d9. How do you do this in Excel. Val, InputBox. -- Earl Kiosterud mvpearl omitthisword at verizon period net ------------------------------------------- "Val Steed" <vals@msn.com> wrote in message news:uEGWBOXTEHA.1168@TK2MSFTNGP11.phx.gbl... > Help, > > Back in a Lotus 1-2-3 macro we could use the command {?} to pause for input, > then the macro would place the input data in a cell, let's say d9. > >...

Can a cell be turned on or off?
A1=B1*C1+D1 A2=B2*C2+D2 A3=B3*C3+D3 A4=B4*B4+B4 I would like to be able the have the total in any one of the A cells to add up only if the cell is click on. In other words, can a cell be turned off or on as needed? -- Joe Right click sheet tab>view code>insert this Private Sub Worksheet_BeforeDoubleClick _ (ByVal Target As Range, Cancel As Boolean) If Target.Column <> 1 Then Exit Sub 'B1*C1+D1 tr = Target.Row Target.Value = Cells(tr, 2) * _ (Cells(tr, 3) + Cells(tr, 4)) End Sub -- Don Guillett Microsoft MVP Excel SalesAid Software dguillett@g...

How do identify a blank cell in a formula
Example: IF(s69=blank,"Void".... What I want to say is if a cell, (s69in this example) is blank, enter the word "Void" but the above way don't work - I don't know how to enter that in this IF formula. Barb, here is one way =IF(ISBLANK(S69),"Void","") -- Paul B Always backup your data before trying something new Please post any response to the newsgroups so others can benefit from it Feedback on answers is always appreciated! Using Excel 2002 & 2003 "Barb123" <Barb123@discussions.microsoft.com> wrote in message news:47...

How do I use Conditinal Format for another cell?
Assuming Cell A1 is the value "Red" or "Green" or "Yellow" How could I have a formula on Cell "C1" containing Conditional formatin the same as below if A1 is "Red" then Bacground of A1 turns to red if A1 is "Blue" then Bacground of A1 turns to Blue if A1 is "Yellow" then Bacground of A1 turns to Yellow I assume that your statement if A1 is "Red" then Bacground of A1 turns to red should be if A1 is "Red" then Bacground of C1 turns to red ??? Assuming that to be true Select C...

Copying into Filtered cells
Hello - I am trying to create a spreadsheet that will record a Year group's data. Each student is attached to a Maths class. I therefore need to be able to filter for a specific maths set and then copy and paste that groups test resutls into the visible cells. However, excel just copies the results into the first 30 cells in the spreadsheet (some of which are not visible due to the filter) - does anyone know how I can get excel to only paste into the filtered cells? this is an example of my spreadsheet - the filter is on maths set. SURNAME CFIRST Maths Set Teacher Paper Level NC ...

increase cell character limit
Hi all, Simple question that is driving me crazy. I'm making a table containing text and numbers. One of the cells in this table has 1459 characters. For some reason, the last couple sentences won't fill the bottom of the cell; instead, they're cut off. I can only see them if I increase the column width, but I don't want to do that since it'll complicate other things (readability, etc). So, how do I get all the text/characters to display in this cell? Thanks -- Weissme ------------------------------------------------------------------------ Weissme's Profile:...

MS Excel VBA DAO SQL where clause cell
Hi I'm trying to get a table of data from MS Access to MS Excel via VBA DAO programming. In my worksheet call 'Data' in cell D14 there is my string value call "toys & Chairs" I can get the DATA into MS Excel without the Where clause in my SQL VBA script. The problem is when I use the WHERE clause which sources its value from cell D14... In my VBA code. Firstly, cell D14 is defined in VBA: Dim r1 As String r1 = Range("D14") Secondly, MY SQL is: SQL = "LVL_1, LVL_2, LVL_3" SQL = SQL & " FROM table_ABC" SQL = SQL &...

How do I get the total of a range of cells that are in another she
I have two sheets in the workbook and I need to get the total of a range in sheet1 into a table on sheet2. How do I go about this? something like =sum(sheet2!$a$1:$a$5) note the ! after the sheet name bobf -- bob777 ------------------------------------------------------------------------ bob777's Profile: http://www.excelforum.com/member.php?action=getinfo&userid=28504 View this thread: http://www.excelforum.com/showthread.php?threadid=487937 ...

Need to add cell comments in unlocked cell on protected worksheet
Using Excel 2002, I have a worksheet that I have "protected" so that only a certain block of cells can be selected/edited. Today, I have a new requirement to be able to add/edit/delete cell comments on those cells that remain unlocked. But the options to do so on the cell context menu disappear when the worksheet is protected, but reappear when the worksheet is unprotected. When you protect the worksheet, scroll down and check "edit objects". This will allow comments to be added/removed/changed--along with other objects (pictures/shapes/etc). dan400man wrote: >...

Swap selected cell values
I am looking for a simple macro to swap the contents of two selected cells. The cells might not be next to each other. I know what I want it to do, but I don't know vba well enough. If anyone has a moment to help, here is what I want to do. Select cell1, could be A1 Control-Click additional selection of cell2, could be C1 Hot-Key Macro to: Assign cell1 value to variable1 Assign cell2 value to variable2 Assign variable1 value to cell2 Assign variable2 value to cell1 Note: the specific cells being selected will not always be the same. So after the macro is run the values that started ...

Add "Significant Figures" to Number tab in "Format Cells" of Excel
Using Excel for science classes (the only classes I ever use Excel for) is a pain because there isn't an easy way to deal with significant figures. Sometimes setting the number of decimal places helps. Plus, it would be nice if excel offered a method for dealing with the number "53,000,000" in which it had 5 sig. figs. Scientific notation would be useful in this circumstance, but usually I have to deal with, for example, "10" such that it has 2 significant figures. It really is a pain going through all the data fixing it to deal with such simple matters. I am...

Deactivating and reactivating cells
how can I deactivate/reactivate a large number off cells as a scenario? I am operating with a 5 year budget, and would like to be able to switch between different horizon alternatives (1-5 years) by simply deactivating the cells connecting to the remaining years ( for example, if I want to use a 2 year horizon, I need to deactivate the cells for year 3-5). Anyone? I would really appreciate some help here:) YOu could use an offset formula. For example, with budget amounts in columns B:F, enter a number between 1 and 5 in cell J1. In cell G2, enter: =SUM(OFFSET(B2,0,0,1,$J$1)) and co...