+ Reply to Thread
Results 1 to 6 of 6

Why does this code not work in excel 2007 ?

  1. #1
    Registered User
    Join Date
    07-22-2005
    Location
    canada
    Posts
    73

    Why does this code not work in excel 2007 ?

    Hello,

    I created a bunch of documents in excel 2003, now have upgraded to 2007 (to take advantage of the dual core ability), and now all my macro's don't work, despite macro security being turned off.

    Here is a sample macro :

    Please Login or Register  to view this content.
    Any suggestions on why this doesn't work?

  2. #2
    Registered User
    Join Date
    07-22-2005
    Location
    canada
    Posts
    73

    Seems as though last row function is messed up..

    Hmm..

    ok, for testing purposes, I added the msgbox just to show me what the code was detecting :

    Please Login or Register  to view this content.
    And the msgbox always comes up with "LastRow is : 3" (which is really the first row of data, out of 62194 row).

    Anybody got any ideas?

    Thanks in advance,

    Spyrule.
    Last edited by spyrule; 11-19-2007 at 10:16 PM.

  3. #3
    Forum Moderator Leith Ross's Avatar
    Join Date
    01-15-2005
    Location
    San Francisco, Ca
    MS-Off Ver
    2000, 2003, & 2010
    Posts
    23,258
    Hello spyrule,

    I don't know if this will help you with your problem. I don't have Excel 2007, but did find this at the Microsoft site...
    All potentially dangerous content is blocked or disabled in the workbook without prompts by default. No security decisions are made when a workbook is opened. For example, documents with macros, ActiveX controls, and data links no longer prompt the user about the possible security concern. These features are disabled. However, users are notified when something is blocked, because the Message Bar appears in the program window. The user can click the bar to take action, including allowing the blocked content if the user’s Group Policy settings allow it. In the past, users had to make this decision before they were able to see the document and with access to little or no information about the spreadsheet.
    This was taken from here...
    Migration considerations for Excel 2007

    Sincerely,
    Leith Ross

  4. #4
    Registered User
    Join Date
    07-22-2005
    Location
    canada
    Posts
    73

    Figured it out.

    Hello,

    Actually, as long as you set your macro security, you don't run into that problem.

    However, I figured out what my real problem was.

    The line :

    Please Login or Register  to view this content.
    Should have had a 5 instead of the 6, since I had changed the layout slightly. Doh!.

    ahh well, figured and fixed.

    thanks again,

    spyrule.

  5. #5
    Forum Moderator Leith Ross's Avatar
    Join Date
    01-15-2005
    Location
    San Francisco, Ca
    MS-Off Ver
    2000, 2003, & 2010
    Posts
    23,258
    Hello spyrule,

    Glad you figured it out and shared your findings.

    Thanks,
    Leith Ross

  6. #6
    Forum Expert royUK's Avatar
    Join Date
    11-18-2003
    Location
    Derbyshire,UK
    MS-Off Ver
    Xp; 2007; 2010
    Posts
    26,200
    spyrule

    You haven't turned macro security to low surely! macro Security should be set to Medium and the workbook will open with a security warning below the Ribbon. Click the Options button and choose to allow the content. Yo can avoid this for your own use by setting up a Trusted Folder -

    http://office.microsoft.com/en-us/he...319991033.aspx

    Also, Excel 2007 has differnt extensions, if you are saving a workbook with macros then it should be *.xlsm.
    Last edited by royUK; 11-21-2007 at 04:13 AM.
    Hope that helps.

    RoyUK
    --------
    For Excel Tips & Solutions, free examples and tutorials why not check out my web site

    Free DataBaseForm example

+ 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