Posts by mhabib

    Re: Referencing an External Workbook


    Or This:


    Code
    ActiveCell.Offset(0, 2).Formula = "='" & myPath & "[RemoteFile.xls]Weekly'!$I$37"


    m


    PS: You'll need to ensure that mypath ends with a backward slash.

    Re: Take data from one sheet and paste it in another


    elopez,


    I'm the one who should be thanking you. I've incorporated the same code into my trip planner. At first I was puzzled that you were'nt using MS Outlook to schedule your meetings. But as I saw in my own case, some things are best left with Excel.


    Regards,


    m

    Hi,


    I need to add a footer in one of my custom views. However, I see no option available for editing custom views. I tried the Add command, but it requires me to retype the name of the custom view - something I'd rather not do. Any suggestions?


    Thanks.


    m

    Hi,


    Is there a command to delete an add-in from the Add-ins List?


    Reason: I had earlier created an add-in that I'm no longer using, and I would like to remove its name from the Add-ins list.


    Thanks.


    m

    Re: Take data from one sheet and paste it in another


    Hi elopez,


    The code below seems to work for me. You can incorporate it into your workbook by pasting it to Sheet1's code window




    HTH


    m

    Re: VBA Code to Change File Extension


    Thanks Norie.


    The Name statement worked great - but only once. Apparently, it won't overwrite a file if it already exists. In other words, if closing.txt already exists, and I run this command:


    Code
    Name "C:\Closing.Lis" As "C:\Closing.Txt"


    Then I get the following error:


    Quote


    Run-time error '58':


    File already exists


    Any thoughts?


    m

    [Solved]Re: Adding Menu Item to Worksheet Menu Bar


    Thanks for the help guys!


    dacat1997: You Rock! Thanks to you, I have a fighting chance to deliver my project on time.


    Norie: My problem's solved. But here's the code that was generated when I recorded the macro to add a new menu to the Worksheet Menu Bar. FYI, it creates a new menu item, but does not take up the caption entry made during the recording process.



    A million thanks once again.


    m

    Re: Convert schedule into database


    Hi tqv1969,


    I tried the following code in your workbook and it seemed to work fine.



    HTH


    m

    Re: Adding Menu Item to Worksheet Menu Bar


    Thanks for the suggestion, Norie.


    I've already tried the record-and-run approach. Unfortunately, I get an illegal operation error when I try to run the recorded code.


    I have the option of creating a custom toolbar and attaching it to the workbook. However, I'd like to generate the commandbar programmatically so that the user cannot simply delete/alter its settings.


    m

    Hi,


    I'd like to Add a new menu item to the Worksheet Menu Bar. The caption on the new menu should be Cost Statement. Within the new menu item, I'd like to add the following buttons.


    First Button:
    Caption: Reset Report
    Macro: ResetAll


    Second Button:
    Caption: Locate Missing IDs
    Macro: UnmatchedListing


    The new menu item needs to be added in when the ThisWorkbook opens, and the worksheet menubar is to be reset each time ThisWorkbook closes.


    Any help would be highly appreciated.


    Thanks.


    m


    PS: ThisWorkbook is a normal excel file (xls) - Not an Add-in

    Re: Code for including a Reference: DAO 3.6


    Hi Guys!


    Thanks for the replies.


    Tanis:
    I checked out the kb link, and I guess you're right about not being able to call the DAO reference programmatically.


    RowanS:
    Thanks for your suggestion. I'll give it a try.


    Regards,


    m

    Re: Copying data from the Internet


    Hi Richard,


    Data Parsing refers to converting running-text data into columns (or Text-to-Columns in Excel-Speak). If you're simply copy/pasting to Excel, then parsing is not an issue. However, using the PasteSpecial > Text command would pose a parsing problem.


    m

    Re: VBA Historical Price Data Loop


    Hi Johan,


    Just add the following code right after the sub statement (or anywyere near the top of the procedure).


    Code
    On Error Resume Next


    This will omit STDEV computations for one-liner securities.


    HTH


    m