+ Reply to Thread
Results 1 to 5 of 5

Problems in saving excel file using excel macros

  1. #1
    Zamir S.
    Guest

    Problems in saving excel file using excel macros

    I have an Excel sheet at work with macros attached to it. I saved the
    worksheet as a different file name so I could make changes. Now anytime I try
    to execute any of the macros in the original worksheet, it first opens the
    file that I "saved as" before it'll execute the macro. I deleted the file
    that I'd "saved as" and now it won't execute a macro at all. It gives me an
    error message saying it can't find a specified file. I've checked over the VB
    coding of the macros to see if Excel made reference to the new file that I'd
    saved, but can't find it referenced anywhere in the code

  2. #2
    Don Lloyd
    Guest

    Re: Problems in saving excel file using excel macros

    Try right-clicking each control in your workbook and re-assigning the the
    macros.

    regards,
    Don

    "Zamir S." <Zamir [email protected]> wrote in message
    news:[email protected]...
    >I have an Excel sheet at work with macros attached to it. I saved the
    > worksheet as a different file name so I could make changes. Now anytime I
    > try
    > to execute any of the macros in the original worksheet, it first opens the
    > file that I "saved as" before it'll execute the macro. I deleted the file
    > that I'd "saved as" and now it won't execute a macro at all. It gives me
    > an
    > error message saying it can't find a specified file. I've checked over the
    > VB
    > coding of the macros to see if Excel made reference to the new file that
    > I'd
    > saved, but can't find it referenced anywhere in the code




  3. #3
    Zamir S.
    Guest

    Re: Problems in saving excel file using excel macros

    Hi Don,

    Thanks a lot for your instant reply. I tried your suggestion but the
    first time when I re-assign the macros it works. The second time when I again
    run the macro it will again open the file that was saved previously. I am
    unable to get rid of this.
    Can you please help.



    "Don Lloyd" wrote:

    > Try right-clicking each control in your workbook and re-assigning the the
    > macros.
    >
    > regards,
    > Don
    >
    > "Zamir S." <Zamir [email protected]> wrote in message
    > news:[email protected]...
    > >I have an Excel sheet at work with macros attached to it. I saved the
    > > worksheet as a different file name so I could make changes. Now anytime I
    > > try
    > > to execute any of the macros in the original worksheet, it first opens the
    > > file that I "saved as" before it'll execute the macro. I deleted the file
    > > that I'd "saved as" and now it won't execute a macro at all. It gives me
    > > an
    > > error message saying it can't find a specified file. I've checked over the
    > > VB
    > > coding of the macros to see if Excel made reference to the new file that
    > > I'd
    > > saved, but can't find it referenced anywhere in the code

    >
    >
    >


  4. #4
    Don Lloyd
    Guest

    Re: Problems in saving excel file using excel macros

    Hi,
    I assume that you saved the Workbook after re-assigning.
    If you did, then double-check to make sure that you haven't missed a control
    somewhere. It only takes one!
    regards,
    Don

    "Zamir S." <Zamir [email protected]> wrote in message
    news:[email protected]...
    > Hi Don,
    >
    > Thanks a lot for your instant reply. I tried your suggestion but the
    > first time when I re-assign the macros it works. The second time when I
    > again
    > run the macro it will again open the file that was saved previously. I am
    > unable to get rid of this.
    > Can you please help.
    >
    >
    >
    > "Don Lloyd" wrote:
    >
    >> Try right-clicking each control in your workbook and re-assigning the the
    >> macros.
    >>
    >> regards,
    >> Don
    >>
    >> "Zamir S." <Zamir [email protected]> wrote in message
    >> news:[email protected]...
    >> >I have an Excel sheet at work with macros attached to it. I saved the
    >> > worksheet as a different file name so I could make changes. Now anytime
    >> > I
    >> > try
    >> > to execute any of the macros in the original worksheet, it first opens
    >> > the
    >> > file that I "saved as" before it'll execute the macro. I deleted the
    >> > file
    >> > that I'd "saved as" and now it won't execute a macro at all. It gives
    >> > me
    >> > an
    >> > error message saying it can't find a specified file. I've checked over
    >> > the
    >> > VB
    >> > coding of the macros to see if Excel made reference to the new file
    >> > that
    >> > I'd
    >> > saved, but can't find it referenced anywhere in the code

    >>
    >>
    >>




  5. #5
    Zamir S.
    Guest

    Re: Problems in saving excel file using excel macros

    Hi,
    I did save the workbook after re-assigning.
    Well let me give you a more clear and consice description of my problem. I
    have a button on the toolbar which is linked to a macro. When I click this
    button the macro fires and get me some data from the DB which is formatted
    and saved in the XLS file. At the very first instance after applying your
    suggestion, the macro ran as per expectation and got the data from the DB and
    saved the data into and XLS file. Now when I am again running this macro,
    that is when I again click on this button on the toolbar then before
    retriving the records from the DB it opens the previously saved file. I then
    checked the macro assigned to the button on the toolbar and I find it that it
    gets changed. I am unable to figure out the problem.
    Can you please help?

    Thanks.
    Zamir


    "Don Lloyd" wrote:

    > Hi,
    > I assume that you saved the Workbook after re-assigning.
    > If you did, then double-check to make sure that you haven't missed a control
    > somewhere. It only takes one!
    > regards,
    > Don
    >
    > "Zamir S." <Zamir [email protected]> wrote in message
    > news:[email protected]...
    > > Hi Don,
    > >
    > > Thanks a lot for your instant reply. I tried your suggestion but the
    > > first time when I re-assign the macros it works. The second time when I
    > > again
    > > run the macro it will again open the file that was saved previously. I am
    > > unable to get rid of this.
    > > Can you please help.
    > >
    > >
    > >
    > > "Don Lloyd" wrote:
    > >
    > >> Try right-clicking each control in your workbook and re-assigning the the
    > >> macros.
    > >>
    > >> regards,
    > >> Don
    > >>
    > >> "Zamir S." <Zamir [email protected]> wrote in message
    > >> news:[email protected]...
    > >> >I have an Excel sheet at work with macros attached to it. I saved the
    > >> > worksheet as a different file name so I could make changes. Now anytime
    > >> > I
    > >> > try
    > >> > to execute any of the macros in the original worksheet, it first opens
    > >> > the
    > >> > file that I "saved as" before it'll execute the macro. I deleted the
    > >> > file
    > >> > that I'd "saved as" and now it won't execute a macro at all. It gives
    > >> > me
    > >> > an
    > >> > error message saying it can't find a specified file. I've checked over
    > >> > the
    > >> > VB
    > >> > coding of the macros to see if Excel made reference to the new file
    > >> > that
    > >> > I'd
    > >> > saved, but can't find it referenced anywhere in the code
    > >>
    > >>
    > >>

    >
    >
    >


+ Reply to Thread

Thread Information

Users Browsing this Thread

There are currently 1 users browsing this thread. (0 members and 1 guests)

Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts

Search Engine Friendly URLs by vBSEO 3.6.0 RC 1