none
easy way to edit long vba code RRS feed

Answers

  • 1. If by 'what is this' you mean the red dots and highlighting, those are breakpoints - places you can tell the code to pause if you run it so you can check values of variables. You turn this on by clicking in the left margin or on the line of code and hitting F9 or using the menu to toggle the breakpoint on/off.

    2. Dropdowns show up when the editor thinks you may be trying to do something and it can help. For instance, if you type 'Dim varMine as' a list of possible variable types shows up. You can scroll the list and pick the type you want.

    3. Not sure what you mean by 'such properties'. Can you clarify?

    I'd recommend something like one of the 'Dummies' books. They provide a lot of basic information about how things work and can get you through the initial learning curve.

    Wednesday, November 12, 2014 11:50 AM
  • I want to know thing like this.

    1.What is this and how it work ? I do not refer the code but the dot that makes colour and selection. 

    2.There is dropdown appears when I type . while writing code. How that can be used and when ?

    3.Are there such properties any more ?

    regards


    In addition to earlier replies, how to learn to debug VBA and the options you have, check below links as well:

    Debugging VBA Code

    Programming: Excel VBA Debugging for Beginners

    Hope this helps,


    Daniel van den Berg | Washington, USA | "Anticipate the difficult by managing the easy"

    Please vote an answer helpful if they helped. Please mark an answer(s) as an answer when your question is being answered.

    Wednesday, November 12, 2014 4:59 PM
  • Hi dockhem2,

    Hi,

    Suppose I have

    'xyz

    'abc

    'def

    Now I want to remove  '  from all lines at once or I want to add  ,  to all at the end, Can I do simultaneously to all of them in VB editor ?

    dockhem


    Yes, you can uncomment the code like figure below:

    In addition, the link provide by previews post is very helpful for learning VBA developing.

    Regards & Fei


    We are trying to better understand customer views on social support experience, so your participation in this interview project would be greatly appreciated if you have time. Thanks for helping make community forums a great place.
    Click HERE to participate the survey.

    Thursday, November 27, 2014 8:59 AM
    Moderator

All replies

  • You can edit your VBA in Word as well. Copy the vba text in Word, edit it and paste it back into your module.
    You can also use Notepad or Notepad ++

    What is it you are exactly looking for? When you edit your code in above programs you don't get intellisense.


    Maurice

    Sunday, November 9, 2014 10:20 PM
  • I meant in vba environment, can we do same as in word ?

    Can you tell me some detail about speciality of editing in vba environment. I do not know anything except copying in to word and return back after edit.

    Thank you and regards,

    dockhem

    Monday, November 10, 2014 1:00 AM
  • I meant in vba environment, can we do same as in word ?

    Can you tell me some detail about speciality of editing in vba environment. I do not know anything except copying in to word and return back after edit.

    Thank you and regards,

    dockhem

    What you can do copy the VBA code in separate Module, so you can modify and edit the code with intellisense.

    No need to copy to other program.

    Hope this helps,


    Daniel van den Berg | Washington, USA | "Anticipate the difficult by managing the easy"

    Please vote an answer helpful if they helped. Please mark an answer(s) as an answer when your question is being answered.

    Monday, November 10, 2014 3:12 AM
  • Hi,

    Thank you for your reply,

    Actually I want to learn easy and faster way to edit VBA code and other characteristics of VBA environment. I am not familiar with it. I do it with MS WORD only.

    regards

    dockhem

    Tuesday, November 11, 2014 8:49 AM
  • Hi,

    Thank you for your reply,

    Actually I want to learn easy and faster way to edit VBA code and other characteristics of VBA environment. I am not familiar with it. I do it with MS WORD only.

    regards

    dockhem

    Well I would not recommend doing any editing in Word, there is no advantage in doing so.

    If you want to learn VBA, or how to use VBA, Google or Bing the world wide web and you would be amazed how many examples you will find on how to start and learn VBA.

    Hope this helps,


    Daniel van den Berg | Washington, USA | "Anticipate the difficult by managing the easy"

    Please vote an answer helpful if they helped. Please mark an answer(s) as an answer when your question is being answered.

    Tuesday, November 11, 2014 6:49 PM
  • can we edit vba code in a easy way like we do in ms word file .

    Define 'Easy'.

    What's hard about editing in the VBA editor? What do you want to do that you find difficult?

    Tuesday, November 11, 2014 7:55 PM
  • Hi,

    In excel it works the same way to open VBA (with ALT+F11). Visual Basic for Application (VBA) works for every application the same way, every application is suitable for the different situations.

    I mostly use Ms Excel for reporting purposes and to automate repeating tasks. I have learned VBA via a course, book and by praticing/excercises. I would advice you t learn it in baby steps, try some easy tasks and extend your tasks every time. To start with a large VBA script is not how a beginner should start, because it is difficult to understand the whole script.

    Regards,

    Reshma

    Tuesday, November 11, 2014 8:11 PM
  • I want to know thing like this.

    1.What is this and how it work ? I do not refer the code but the dot that makes colour and selection. 

    2.There is dropdown appears when I type . while writing code. How that can be used and when ?

    3.Are there such properties any more ?

    regards


    • Edited by dockhem2 Wednesday, November 12, 2014 8:04 AM
    Wednesday, November 12, 2014 8:02 AM
  • 1. If by 'what is this' you mean the red dots and highlighting, those are breakpoints - places you can tell the code to pause if you run it so you can check values of variables. You turn this on by clicking in the left margin or on the line of code and hitting F9 or using the menu to toggle the breakpoint on/off.

    2. Dropdowns show up when the editor thinks you may be trying to do something and it can help. For instance, if you type 'Dim varMine as' a list of possible variable types shows up. You can scroll the list and pick the type you want.

    3. Not sure what you mean by 'such properties'. Can you clarify?

    I'd recommend something like one of the 'Dummies' books. They provide a lot of basic information about how things work and can get you through the initial learning curve.

    Wednesday, November 12, 2014 11:50 AM
  • I want to know thing like this.

    1.What is this and how it work ? I do not refer the code but the dot that makes colour and selection. 

    2.There is dropdown appears when I type . while writing code. How that can be used and when ?

    3.Are there such properties any more ?

    regards


    In addition to earlier replies, how to learn to debug VBA and the options you have, check below links as well:

    Debugging VBA Code

    Programming: Excel VBA Debugging for Beginners

    Hope this helps,


    Daniel van den Berg | Washington, USA | "Anticipate the difficult by managing the easy"

    Please vote an answer helpful if they helped. Please mark an answer(s) as an answer when your question is being answered.

    Wednesday, November 12, 2014 4:59 PM
  • Thank you  42Doug,

    Such properties , I mean anything similar to dropdown etc there in vba environment, I have not come across.

    Many thanks again,

    dockhem

    Wednesday, November 12, 2014 7:00 PM
  • Thank you  danishani,

    regards

    dockhem

    Wednesday, November 12, 2014 7:02 PM
  • Hi Dockhem2,

    >>Such properties , I mean anything similar to dropdown etc there in vba environment, I have not come across.<<

    Did you mean the intellisense provided by VB editor? If yes, it wolud dispaly when we type dot and the VBE enviroment find the defined-type. Here are some useful links for you learning VBA:
    Visual Basic user interface Help

    Welcome to the Visual Basic for Applications language reference for Office 2013

    Regards & Fei


    We are trying to better understand customer views on social support experience, so your participation in this interview project would be greatly appreciated if you have time. Thanks for helping make community forums a great place.
    Click HERE to participate the survey.

    Monday, November 17, 2014 11:32 AM
    Moderator
  • Hi,

    Suppose I have

    'xyz

    'abc

    'def

    Now I want to remove  '  from all lines at once or I want to add  ,  to all at the end, Can I do simultaneously to all of them in VB editor ?

    dockhem


    • Edited by dockhem2 Wednesday, November 26, 2014 9:54 AM
    Wednesday, November 26, 2014 9:53 AM
  • Hi dockhem2,

    Hi,

    Suppose I have

    'xyz

    'abc

    'def

    Now I want to remove  '  from all lines at once or I want to add  ,  to all at the end, Can I do simultaneously to all of them in VB editor ?

    dockhem


    Yes, you can uncomment the code like figure below:

    In addition, the link provide by previews post is very helpful for learning VBA developing.

    Regards & Fei


    We are trying to better understand customer views on social support experience, so your participation in this interview project would be greatly appreciated if you have time. Thanks for helping make community forums a great place.
    Click HERE to participate the survey.

    Thursday, November 27, 2014 8:59 AM
    Moderator