VB6 & Excel Read only problem

Collapse
X
 
  • Time
  • Show
Clear All
new posts
  • Wernerh
    New Member
    • Jul 2007
    • 104

    VB6 & Excel Read only problem

    Hi all, Have created a vb application that interacts with Excel for report purposes. Base application and excel file is on host pc on network. I require the clients to access the excel workbook for reports and then enter data as required. All works perfect other than workbook opening on guest workstations as read only! I have done everything i could think of to correct this. Set sharing on host, tried mapping a network drive, checked the file attributes were not read only. Has anyone else got any ideas as to what to try. Bit defender is the anti virus, so maybe that has something to do with it, but you cannot acces it to set any form of permissions. I have even tried writing the excel launch command into the shortcut to force it open normal. Did not work. Opens fine on host machine.

    "C:\Program Files\Microsoft Office\OFFICE11 \EXCEL.EXE" "X:\program files\mps1\repo rt.XLS"

    Would appreciate in input into this - thanks
    Werner
  • Tequilaman
    New Member
    • Oct 2007
    • 43

    #2
    Would it be an option to let the user click through the path to open the file and only allow the specified filename? - In case the drives are mapped with different letter for different departments I use this way.

    Comment

    • Wernerh
      New Member
      • Jul 2007
      • 104

      #3
      Originally posted by Tequilaman
      Would it be an option to let the user click through the path to open the file and only allow the specified filename? - In case the drives are mapped with different letter for different departments I use this way.
      I have tried that too! Made the shortcut directly to the actual file, drivepath and specific file - same problem.

      Comment

      • prakashsakthivel
        New Member
        • Oct 2007
        • 57

        #4
        Hi Member


        First of all Make sure all Object varibales whether released from memory or not.

        that means if you use File system object
        at the end of program, all object varibales should be released from memory.
        because this variable link with that file until you will clear the variable


        Regards
        Prakashsakthive l

        Comment

        • Wernerh
          New Member
          • Jul 2007
          • 104

          #5
          Originally posted by prakashsakthive l
          Hi Member


          First of all Make sure all Object varibales whether released from memory or not.

          that means if you use File system object
          at the end of program, all object varibales should be released from memory.
          because this variable link with that file until you will clear the variable


          Regards
          Prakashsakthive l
          I do that as a rule, when the VB project closes all objects are unloaded. I made double sure by rebooting the host and then only opening the excel file from the guest without activating the vb app.

          Comment

          • Wernerh
            New Member
            • Jul 2007
            • 104

            #6
            Originally posted by Wernerh
            I do that as a rule, when the VB project closes all objects are unloaded. I made double sure by rebooting the host and then only opening the excel file from the guest without activating the vb app.
            Do you think the VBA in the workbook could have that as an issue?

            Comment

            • prakashsakthivel
              New Member
              • Oct 2007
              • 57

              #7
              Originally posted by Wernerh
              Do you think the VBA in the workbook could have that as an issue?

              What I try to say that not close the application
              only close function or procedure
              at that time few milliseconds that varibale may link with that file
              meanwhile you try to open that file, this error may come


              Regards

              Prakashsakthive l

              Comment

              • Wernerh
                New Member
                • Jul 2007
                • 104

                #8
                Originally posted by prakashsakthive l
                What I try to say that not close the application
                only close function or procedure
                at that time few milliseconds that varibale may link with that file
                meanwhile you try to open that file, this error may come


                Regards

                Prakashsakthive l
                Ok, understand that, but the function is a pure write to excel from vb function. once completed, there is no more link. That is why I said i rebooted to clear all or any links that might exist. Then just tried to open the workbook accross the network as if is was any standalone excel file. It is very puzzling.

                Comment

                Working...