CodeGuru Home VC++ / MFC / C++ .NET / C# Visual Basic VB Forums Developer.com
Results 1 to 5 of 5
  1. #1
    Join Date
    Apr 2003
    Posts
    322

    Cant edit module- again,(SP6 installed)

    This problem happened keeps happening, even AFTER I've installed SP6.
    I dont have Source safe running, but this project IS in VSS, and I have several modules checked out.

    Sometimes, after I set breakpoints in the IDE and try to run a project, VB responds with Cant Edit Module. This problem originally ocurred ONLY when I tried to compile an EXE.

    I used to be able to clear this condition, by exiting the IDE and re-starting, but now this doesn't always work.

    SP 6 was supposed to have fixed this.
    Whats going on now ??

  2. #2
    Join Date
    Jan 2000
    Location
    Olen, Belgium
    Posts
    2,477

    Re: Cant edit module- again,(SP6 installed)

    Make sure the files are writable. VSS will save the files readonly.
    Tom Cannaerts
    email: cakkie@cakkie.be.remove.this.bit
    www.tom.be (dutch site)

  3. #3
    Join Date
    Apr 2003
    Posts
    322

    Re: Cant edit module- again,(SP6 installed)

    Quote Originally Posted by Cakkie
    Make sure the files are writable. VSS will save the files readonly.
    This darn problem is back again, and now even rebooting doesn't clear it, like it used to.

    The VBP and VBW files are writeable. The exes previously generated are writable (even though I'm not compiling).

    Some of the source files which are checked out from VSS are writeable.
    If I make all fo the files in the soruce directory writeable, the problem goes away, but then that is dangerous.

    I just wish VB would tell me which file it is complaining about.

  4. #4
    Join Date
    Apr 2003
    Posts
    322

    Some insight into *my* recurring "can't edit module" problem

    Form previous posts, you can see that i keep having a recurring problem with VB displaying the "Can't Edit module' problem. Sometimes I would see this only when compiling. Other times I would se it when I run my app from within the IDE.

    While I've tried all mentioned solutions, nothing has helped permanently.

    And now, even rebooting XP doesn't help.

    Today, I cannot even debug the program at all. In the past, I've made all the files in the soure directory writeable, and that has fixed the problem, but that solution can cause problems with source control.

    Today I made all the .BAS files writeable, restarted the IDE, and tried to run. Same Problem. I restored all the .BAS files to their original state.

    I tried the same with all the FRM & FRX files. Suddenly I was able to run the debugger. So I went through the FRM files one by one, starting with all of them unwriteable, then makeing them writeable, starting the IDE and running the project.

    I finally found the file which was casing "Cant Edit Module" to be diplayed- at least for today. Oddly enough, it is a frm which is never used by me, when I run hte app, only by one of the developers.

    I've set a breakpoint in Form load, and re-ran the app.
    This form never gets called on startup, which I expected. This form is only loaded by a hot key combo, or from an application menu option.

    Looking in the project .VBP and VBW files, there is only one reference to this form in each file. I don't know what the parameters mean, but I assume they have something to do with screen coordinates and form dimensions at runtime.

    This line is from the VBW file
    Plot = -5, 86, 897, 570, Z, 66, 66, 688, 556, C

    This line is from the VBP file
    Form=Plot.frm

    Is there anything here that tels the VB IDE to try and write to this frm file, when I Click the Run Arrow ?

    For now, I know what the culprit is, assuming this doesn't migrate to another frm or other file, so I can live with the hacky solution.

    I would like to understand what is happening know how to fix it permanently.
    I'm running out of places to stick pins into my bill gates voodoo doll.


    Thanks

  5. #5
    Join Date
    Mar 2005
    Location
    Vienna, Austria
    Posts
    4,538

    Re: Cant edit module- again,(SP6 installed)

    I once had a similar problem with source safe in VB 6.0 At least I saved all files of the project ( in the actual version ! ) in another directory. There I made all files writeable again. Then I deleted the project in the source safe and in the old directory too. Then I copied the files back from the directory where I had saved them into the original directory and loked if they are still all writeable. They was. Then I started VB and safed the project in VSS again.
    Then all worked as it should.

    IMHO in my case Source safe and the program wasn't synchron regarding which files are writeprotected (probelms because this code was asynchron to VSS before SP 6 and stayed in that condition after installing SP6 ) and which not and this brought all my troubles.

    I hope your troubles are similar and this will help you

    Jonny Poet
    Jonny Poet

    To be Alive is depending on the willingsness to help others and also to permit others to help you. So lets be alive. !
    Using Code Tags makes the difference: Code is easier to read, so its easier to help. Do it like this: [CODE] Put Your Code here [/code]
    If anyone felt he has got help, show it in rating the post.
    Also dont forget to set a post which is fully answered to 'resolved'. For more details look to FAQ's about Forum Usage. BTW I'm using Framework 3.5 and you ?
    My latest articles :
    Creating a Dockable Panel-Controlmanager Using C#, Part 1 | Part 2 | Part 3 | Part 4 | Part 5 | Part 6 | Part 7

Posting Permissions

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





Click Here to Expand Forum to Full Width

Featured