+ Reply to Thread
Results 1 to 1 of 1

Urgent -VBA code works erratically in macro protected folders even after enabling macros

  1. #1
    Registered User
    Join Date
    09-19-2009
    Location
    Bangalore,India
    MS-Off Ver
    Excel 2003
    Posts
    46

    Urgent -VBA code works erratically in macro protected folders even after enabling macros

    Hi,

    I urgently need help on this issue. I have written a vba program that is supposed to run different lines of code based on the conditions met. The code converts a .xlsx file to .xltm with additional features. The .xltm is used to create ,xlsm versions as and when required in the lab. Depending on the conditions, the .xltm file is created or the .xlsm file is activated. The code works beautifully from the desktop or My documents folders. However, if the .xlsm is stored to my folder or any other folder on the secure network server, it always starts with a warning regarding Macros and a button to choose if we wish to continue editing. Normally if the trust center is not fully enabled for Macros, this happens. However, even though the trust center is enabled on my PC on the network, I get this message when accessing my folder on the server. On clicking the continue editing button strange things happen. The .xlsm file, created on certain conditions from the .xltm file, now tries to create a .xltm file again! It is not supposed to do that. Clicking cancel makes it go to its normal opening screen and then behave peculiarly as given below.

    The With and If condition opening lines are ignored and lines that are NOT supposed to run are executed, resulting in errors at several stages and the ultimate debug *** erro message with the only the End button enabled. Sometimes the error is 1004, sometimes it says With block error or Object missing error. However from the desktop or My documents folders no such error occur. Why is this happening? How do I get around this? Pls help ASAP. Thanks in advance.

    11/06/2015
    I find that the problem lines involve selecting a range or a sheet for some search, etc. With this line I get the error - Application defined or object defined error 1004

    Please Login or Register  to view this content.
    Modifications of the same line gives method Range of object _global failed.
    How do I resolve this issue? The code works perfectly from the desktop, not from any server folder.
    Thanks in advance.
    Regds

    Other options tried:

    Please Login or Register  to view this content.
    All fail on the network.
    Last edited by Balachan56; 06-11-2015 at 08:06 PM. Reason: Additional info provided

+ Reply to Thread

Thread Information

Users Browsing this Thread

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

Similar Threads

  1. URGENT - have code that only works for 32 bit-need 64 too!
    By Muzza86 in forum Excel Programming / VBA / Macros
    Replies: 18
    Last Post: 05-12-2014, 10:36 AM
  2. Enabling macros-VBA code instead of expecting the user to do it?
    By LydiasDad in forum Excel Programming / VBA / Macros
    Replies: 1
    Last Post: 07-10-2011, 02:03 PM
  3. [SOLVED] Countif thats works erratically
    By Paulinmarketing in forum Excel Formulas & Functions
    Replies: 3
    Last Post: 05-09-2006, 11:50 AM
  4. Enabling macros while the sheet being protected !
    By dinesh in forum Excel General
    Replies: 13
    Last Post: 09-27-2005, 03:47 PM
  5. No Macros but Macro enabling message
    By Hari Prasadh in forum Excel Programming / VBA / Macros
    Replies: 9
    Last Post: 07-05-2005, 05:05 AM

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