Assign Macros to Toolbar Problem

I have a large spreadsheet that I have added a toolbar and 
menu to with macros for navigation.
The problem occurs when I change the name of the 
spreadsheet I am using from workjune.xls to workjuly.xls.
All of the macros on the toolbar and menu still refer to 
the macros in the old file not the new one.
Is there any way of assign the macros without the filename 
so that it always looks for the macro in the current file.

Any ideas would be greatly appreciated.
0
neillwood (2)
7/10/2003 9:02:35 AM
excel.misc 78881 articles. 5 followers. Follow

1 Replies
540 Views

Similar Articles

[PageSpeed] 43

Neil,
If you have the file open in Excel and use Save As to change the name it
should update the tollbar links to the new name.  If you change the file
name outside of Excel then it doesn't effect the toolbar.

Good Luck,
Mark Graesser


"Neill Wood" <neillwood@yahoo.co.uk> wrote in message
news:a40c01c346c2$00fb8830$a401280a@phx.gbl...
> I have a large spreadsheet that I have added a toolbar and
> menu to with macros for navigation.
> The problem occurs when I change the name of the
> spreadsheet I am using from workjune.xls to workjuly.xls.
> All of the macros on the toolbar and menu still refer to
> the macros in the old file not the new one.
> Is there any way of assign the macros without the filename
> so that it always looks for the macro in the current file.
>
> Any ideas would be greatly appreciated.


0
7/10/2003 1:34:54 PM
Reply:

Similar Artilces:

problem with accessing toolbar button
I want to have a toolbar button pressed state pwhen I choose a menu item, so I add to the handler function of the menu item in mainframe: CToolBarCtrl tbCtrl = m_wndToolBar.GetToolBarCtrl(); tbCtrl.PressButton(ID_MYBUTTON, 1); I get the following error at compile time: Error 1 error C2248: 'CObject::CObject' : cannot access private member declared in class 'CObject' c:\program files\microsoft visual studio 8\vc\atlmfc\include\afxwin.h 1814 Obviously, I can't access the toolbar button with this approach, so how should I write it to get the button pressed? >I want to...

Call Macro
Can I call a Macro to run from a scheduled Task. If yes, How. Thanks for your help. Jim Walsh Hi, You could do this. Create a task that opens a workbook at the required time and in that workbook utilise the Open event to call your macro Private Sub Workbook_Open() Call MyMacro End Sub Sub MyMacro() 'Do things End Sub -- Mike When competing hypotheses are otherwise equal, adopt the hypothesis that introduces the fewest assumptions while still sufficiently answering the question. "jswalsh33" wrote: > Can I call a Macro to run from a sch...

CAsyncSocket problem.
I want to use the CAsyncSocket to send a broadcast and get any response. I have set the socket blocking and the progress will stop at the ReceiveFrom but get nothiny. how should I do ? Thanks. WSADATA wsaData; WORD wVersionRequested = MAKEWORD(1, 1); if (WSAStartup(wVersionRequested, &wsaData) != 0) return -1; CAsyncSocket AsSock; const BOOL bBS = TRUE; if(AsSock.Create(0, SOCK_DGRAM, 0) == FALSE) { cerr << "Create Socket failed" << endl; } DWORD dw = 0; if(AsSock.IOCtl(FIONBIO, &dw) == FALSE) { cerr << "IOCtl failed&quo...

assign a shortcut key in access
I want to assign a shortcut key in a form like when a user presses CTRL+S a code should run like Go To Control combo1 and me.combo1.dropdwon any way to do this? You need to yous the AutoKeys macro. Here's a very good explanation of how to do that! http://www22.brinkster.com/accessory/macros/002.shtml -- There's ALWAYS more than one way to skin a cat! Answers/posts based on Access 2000 Message posted via AccessMonster.com http://www.accessmonster.com/Uwe/Forums.aspx/access-forms/200707/1 missinglinq via AccessMonster.com wrote: > You need to yous the AutoKeys macro. Here&...

Problems opening Publisher Document
I used the Trial Version of Publisher and decided not to buy it and went back to my old Publisher 2000. Now I cannot open the documents created using the trial version. What can I do? Open it with your Trial version and Save As a Pub 2000 file...other than that..you can't do anything. "KSmith Financial" wrote: > I used the Trial Version of Publisher and decided not to buy it and went back > to my old Publisher 2000. Now I cannot open the documents created using the > trial version. What can I do? ...

EnableWindow() problem
Hello, I have trouble with AfxGetMainWnd()->EnableWindow() at least on Windows XP. Not tested this . My main application needs to run another GUI program and while this program run should not be accessible for user input. In order to do this I call AfxGetMainWnd()->EnableWindow(FALSE); Start the GUI program Then use a bit of code to wait for the GUI to finish. See snippet below: HANDLE aHandles[2]; aHandles[0] = GetCurrentProcess(); aHandles[1] = hGUI; do { DWORD dwResult = ::MsgWaitForMultipleObjects(2, aHandles, FALSE, INFINITE, QS_ALLEVENTS); if ( !pr...

Assigning values from a sheet to an array
Can anyone explain why I get a runtime error with the code below.MANY THANKS! Option Explicit Option Base 1 Sub testing3() Dim Vt() As Double Dim j As Long Dim i As Long ReDim Preserve Vt(1 To 40) For i = 1 To 40 j = Int(Rnd() * 1100) Vt(i) = Worksheets("data").Cells(1, j) Next i End Sub ** Posted via: http://www.ozgrid.com Excel Templates, Training, Add-ins & Software! http://www.ozgrid.com/Services/excel-software-categories.htm ** Because j is greater than 256, the maximum number of columns in Excel. Alan Beban Ann...

disable macros + others
I have an old spreadsheet from 2001, I haven`t a clue now how I constructed it but would like if possible to do 3 things. 1. I have apparently put macros in it although what I don`t know and would prefer to disable. 2. When I open the workbook that particular sheet is only approx quarter the size of the workbook screen, I would like full size. 3. I apparently have a password on it, can I disable it? Haven`t a clue what it is now. thanks On Jul 21, 10:07=A0am, "SS" <nonens...@blueyonder.co.uk> wrote: > I have an old spreadsheet from 2001, I haven`t a clue now how I ...

No "Assign Macro"
In the Excel help files it indicates that you can execute a pre-recorded macro from a command button. It states to first record the macro, then create the button, then right click on the button to get the shortcut menu and choose Assign Macro. I have tried this in both Excel 97 and Excel 2002 and in both cases I do not have any such item as "Assign Macro". Am I missing something If not by this elusive shortcut menu item, how can I assign the pre recorded macro through code? Aaron, It may be that your working with a command button from the "Control Toolbox" instead of...

Resizing and printing problems
Hi all I am trying to print a wedding invitation using publisher 2003. I have tried to print using a booklet sized 13.5cm x 13.5cm, however when i print, the pages are not in the correct order. I wish to print pg1 on left, pg4 on right. pages 2,3 will be inside left (pg2) then right (pg3) Printing is done on a standard home printer. What am i doing wrong?? TIA The way you describe, it is confusing. What do you want on the back of page 1? A sheet of paper when folded is 4 pages. One side are pages 1 and 4 and the other side are pages 2 and 3. -- Don Vancouver USA "Cam Neeso...

Problem with deleting macro
I have one workbook that, on opening, displays the message "The workbook you are opening contains macros." I researched on the newsgroups and thought the problem was related to Personal.xls, so I went there and there was a macro. Deleted it. (This was the only macro listed for the open workbook or for Personal.xls.) After deleting macro, I still got the message on open. Read some more and thought I should delete the Personal.xls FILE. I did that and I STILL get the message. This only happens for one file, not for all my workbooks. Is there some other way to eliminate thi...

Outlook2003
Hi, I can receive and reply w/o any problem, however when I conduct a new message to the same address. It goes undelivered and I never get a message stating it was undeliverable. The test was done from my yahoo account. When I put the recipient's address inside double quotes, the message goes through fine. I'm suspecting a compatibility issue between Outlook2003 and Exchange5.0 w/sp 2. ...

Toolbar Settings Changing
A few days ago I posted a problem that my toolbar settings had changed, and when I restored them the way I want them, the next time I opened Outlook they would change back. I received an answer instructing me to rename the outcmd file and let Outlook create a new one, then make the changes again. THAT WORKED. Now, however, sporadically, when I open Outlook, those settings are AGAIN changed until I reboot. After that they'll be the way I set them for a while, then change again and I have to reboot again. It appears that Outlook has a mind of its own. Is there any way to corre...

Serial Numbers auto assigned
S/N are being auto assigned when the SOP Setup Options DO NOT have "auto-assign serial numbers" marked. We do NOT want to use a separate fulfillment process. Up until a few months ago, everything was fine. Now, when a PO item, assigned to a sales line item comes in, the s/n is autoassigned. How can I get this to go back the way it was? Below is the way we have had our SOP set up for eight years - why has it changed? Set-up>SOP>ORDER Allocate by: Doc/Batch X Transfer Order to BO / Transfer Order to Invoice Options: X Allow repeating documents _ Use Separate Fulfil...

"manual" serialization problem
I have written an MDI app that uses serialization. Now I have started a task that requires reading data into the document object without displaying/viewing, etc. So I get the file name using a CFileDialog, create a new CFile and open it, then create a new CArchive object as follows: if ( newFile.Open(fileName, CFile::modeRead) == 0) // Error opening file { #ifdef DEBUG CString msg = "Cannot open " + fileName; AfxMessageBox(msg); #endif return FILE_ERROR; } CArchive ar(&newFile, CArchive::load); scanDoc->Serialize( ar ); The problem is, the process fa...

Macro size limit?
Dear All Is there a limit or a desirable maximum size of a macro? for instance one of our users has recorded lots of actions into one macro (and intends to keep adding to it). At present the macro is 117kb (13 pages of printed text). He can split the macro into several separate ones if size is an issue. Thanks in advance. Belinda Belinda, You should split the module in to several modules, each less than 64KB. -- Cordially, Chip Pearson Microsoft MVP - Excel Pearson Software Consulting, LLC www.cpearson.com "Belinda Robinson" <bel@rl.ac.uk> wrote in message news:bovrh...

Is anybody ran into this problem
Whenever I try to pay a scheduled bill I get the following error message "Money could not write to your money file. The operation can not be performed or another application finished this task before you. Please try again." The transaction is crossed out in the calendar but there is a duplicate one left like it. Is my file corrupt? How can I fix it??? I am using Money 2001 Deluxe. "Fred Gomez" <phredgomez(nospam)@yahoo.com> wrote in message news:G%fzb.50$uE6.1@nwrddc02.gnilink.net... > Whenever I try to pay a scheduled bill I get the following error message >...

Check Auto Filter
I can't figure out how to do this. Before my macro runs I want to check to see if AutoFilter is turned on. If it is I want to turn it off - if it isn't then do nothing. Rows("2:4").Select Selection.EntireRow.Hidden = False Range("A2").Select Selection.ClearContents Range("I2").Select 'Application.Run "'NamedInsuredList 2 11-2009.xls'!CheckBoxFilter_Click" Range("PolicyList").Sort Key1:=Range("A7"), Order1:=xlAscending, Header:= _ xlGuess, OrderCustom:=1,...

No Assigned Licenses
We have a total of 5 licenses. However only three users can access the CRM applications. If any other user tries to access the application we get an error message stating No Assigned Licenses Any suggestions? Thanks. Matthew You have to actually go assign the users licenses with the CRM, Log in to CRM as administrator, Click Settings from the Left menu, Click Business Unit Settings, Click users, Click the user you want to assign a license to, then from the popup click license from the left menu, Click Manage Licenses and add a license to that user. Just to warn you do not remove the l...

I NEED A MACRO!!!!
I have an excel file that I always save as a text file for importing into another program. I was wondering if a Macro could be made to do this? I have tried to record the Macro as I do it, but it didn't even save it. If you save the file as a normal workbook, then the recorded macro will be saved with that workbook. So record your macro when you save it as a text file. Stop recording. Save the file once more as a normal workbook. DebbieSue wrote: > > I have an excel file that I always save as a text file for importing into > another program. I was wondering if a Macro...

Vlookup problem
Hello. I am using a vlookup in a text box. The string looks up info from a table based on a selection or the information already contained in a combo box. The problem is, if I make a change to the information in the combo box, the vlookup does not update. Could this be due to code I have running in the AfterUpdate of my form? Anyone ever had this problem? Thank you. I am actually using DLookup. Sorry for the confusion. On Jan 17, 2:01=A0pm, "nybasebal...@gmail.com" <nybasebal...@gmail.com> wrote: > I am actually using DLookup. =A0Sorry for the confusion. Does the C...

Assigned task
Hi, we are receiving emails from our bosses with attachment of our schedule task which we manually enter into our outlook task folder, is there a way or how can we automatically accept assigned task to integrate to our task folder. We are using outlook2000 under windows98 the outlook 2000 version is part of the office 2000 package install on out PC's. TIA Is your boss sending the tasks to you using Outlook Rich Text Format? If not, have him start. Also, how is he assigning tasks? Using the Assign Task feature or forwarding the task to you? -- Milly Staples [MVP - Outlook] ...

Macro to Exit Worksheet when vbNo selected
Hi, I have a straightforward msgBox that starts when a worksheet is opened. It has vbYesNo Is there any code that I can put into or assign to the No buton that will close the worksheet without saving anything, including the prompt for 'Do you want to Save Changes' msg that normally comes up when closing. Bottom line...if Yes, then we continue with input....if No then close (exit) immediately Thanks Craig The following code will open a Msgbox and if the user chooses No, the workbook will close without saving any changes. Dim Res As VbMsgBoxResult Res = MsgB...

Word 2007 printing problem
I'm printing a page of labels on a color printer and they are printing in black and white. Every other Word 2007 document that I print there prints in color. Do you know what I did to the labels that would make them print in black and white? -- Janet M. Take a look at the Printer Properties in the File>Print dialog. -- Hope this helps. Please reply to the newsgroup unless you wish to avail yourself of my services on a paid consulting basis. Doug Robbins - Word MVP, originally posted via msnews.microsoft.com "Janet M" <JanetM@discussions.microsoft...

x axis problems
I have a standard 3d graph indicating insurance claims paid out over a 7 year period. The y axis is dollars and the x axis is an annual term (i.e. 01/01/1998 to 01/01/1999). When the source data is set, the years read 01/01/1999 to 01/01/1998. The reverse order option merely reverses the entire order of the 7 year period, not the readout on the individual years. Any help? Charlie - Do you mean the data is not in chronological order in the sheet? In a line chart, there are two possible types of X axis. One type is categorical, which just lists the data in its worksheet order, so dates...