PC Review


Reply
Thread Tools Rate Thread

auto-indent in vb editor

 
 
Edward
Guest
Posts: n/a
 
      30th Jun 2007
Is there a way to auto-indent code in the VB editor for macros in
Excel? That is, if my code looks like:

if a = 7 then
call b
end if

change it to:

if a = 7 then
call b
end if

Thanks.

Edward

 
Reply With Quote
 
 
 
 
RB Smissaert
Guest
Posts: n/a
 
      30th Jun 2007
http://www.oaltd.co.uk/Indenter/Default.htm

RBS


"Edward" <(E-Mail Removed)> wrote in message
news:(E-Mail Removed)...
> Is there a way to auto-indent code in the VB editor for macros in
> Excel? That is, if my code looks like:
>
> if a = 7 then
> call b
> end if
>
> change it to:
>
> if a = 7 then
> call b
> end if
>
> Thanks.
>
> Edward
>


 
Reply With Quote
 
Gary Keramidas
Guest
Posts: n/a
 
      1st Jul 2007
installed this and found a problem. it seems to delete shortcut keys assigned to
a macro. i have control-shift-r assigned to a code module that print previews a
report.

after running indent project, or opening the module and running indent
procedure, the shortcut is deleted. go to the options for the macro and it's
blank.

just thought i'd pass it on. sent the author an email, too.

it does do a good job, though.
--


Gary


"RB Smissaert" <(E-Mail Removed)> wrote in message
news:(E-Mail Removed)...
> http://www.oaltd.co.uk/Indenter/Default.htm
>
> RBS
>
>
> "Edward" <(E-Mail Removed)> wrote in message
> news:(E-Mail Removed)...
>> Is there a way to auto-indent code in the VB editor for macros in
>> Excel? That is, if my code looks like:
>>
>> if a = 7 then
>> call b
>> end if
>>
>> change it to:
>>
>> if a = 7 then
>> call b
>> end if
>>
>> Thanks.
>>
>> Edward
>>

>



 
Reply With Quote
 
RB Smissaert
Guest
Posts: n/a
 
      1st Jul 2007
There is one more, much more serious problem.
If you run the indenter and there is a syntax error in your
code then the indenter code can go in an endless loop, freezing it up.
There is no other way out of this then to kill Excel with Ctrl + Alt + Del.
This means losing all your work if you are working on an .xla project
and possibly also if you were working on an .xls file.
So, best always to run Debug, Compile before running the indenter.
Not sure if this serious bug has been fixed in the latest version, but I
sure
have wasted several hours work due to this.

RBS

"Gary Keramidas" <GKeramidasATmsn.com> wrote in message
news:(E-Mail Removed)...
> installed this and found a problem. it seems to delete shortcut keys
> assigned to a macro. i have control-shift-r assigned to a code module that
> print previews a report.
>
> after running indent project, or opening the module and running indent
> procedure, the shortcut is deleted. go to the options for the macro and
> it's blank.
>
> just thought i'd pass it on. sent the author an email, too.
>
> it does do a good job, though.
> --
>
>
> Gary
>
>
> "RB Smissaert" <(E-Mail Removed)> wrote in message
> news:(E-Mail Removed)...
>> http://www.oaltd.co.uk/Indenter/Default.htm
>>
>> RBS
>>
>>
>> "Edward" <(E-Mail Removed)> wrote in message
>> news:(E-Mail Removed)...
>>> Is there a way to auto-indent code in the VB editor for macros in
>>> Excel? That is, if my code looks like:
>>>
>>> if a = 7 then
>>> call b
>>> end if
>>>
>>> change it to:
>>>
>>> if a = 7 then
>>> call b
>>> end if
>>>
>>> Thanks.
>>>
>>> Edward
>>>

>>

>
>


 
Reply With Quote
 
Gary Keramidas
Guest
Posts: n/a
 
      1st Jul 2007
thanks for the heads up.

--


Gary


"RB Smissaert" <(E-Mail Removed)> wrote in message
news:%(E-Mail Removed)...
> There is one more, much more serious problem.
> If you run the indenter and there is a syntax error in your
> code then the indenter code can go in an endless loop, freezing it up.
> There is no other way out of this then to kill Excel with Ctrl + Alt + Del.
> This means losing all your work if you are working on an .xla project
> and possibly also if you were working on an .xls file.
> So, best always to run Debug, Compile before running the indenter.
> Not sure if this serious bug has been fixed in the latest version, but I sure
> have wasted several hours work due to this.
>
> RBS
>
> "Gary Keramidas" <GKeramidasATmsn.com> wrote in message
> news:(E-Mail Removed)...
>> installed this and found a problem. it seems to delete shortcut keys assigned
>> to a macro. i have control-shift-r assigned to a code module that print
>> previews a report.
>>
>> after running indent project, or opening the module and running indent
>> procedure, the shortcut is deleted. go to the options for the macro and it's
>> blank.
>>
>> just thought i'd pass it on. sent the author an email, too.
>>
>> it does do a good job, though.
>> --
>>
>>
>> Gary
>>
>>
>> "RB Smissaert" <(E-Mail Removed)> wrote in message
>> news:(E-Mail Removed)...
>>> http://www.oaltd.co.uk/Indenter/Default.htm
>>>
>>> RBS
>>>
>>>
>>> "Edward" <(E-Mail Removed)> wrote in message
>>> news:(E-Mail Removed)...
>>>> Is there a way to auto-indent code in the VB editor for macros in
>>>> Excel? That is, if my code looks like:
>>>>
>>>> if a = 7 then
>>>> call b
>>>> end if
>>>>
>>>> change it to:
>>>>
>>>> if a = 7 then
>>>> call b
>>>> end if
>>>>
>>>> Thanks.
>>>>
>>>> Edward
>>>>
>>>

>>
>>

>



 
Reply With Quote
 
Gary Keramidas
Guest
Posts: n/a
 
      1st Jul 2007
rb:

you know what gets me sometimes?

when i am testing some code, using a userform with a command button the print
previews something. i always forget to make the userform modeless or unload it
before the page preview. the only i have been able to break the loop is to end
the task and lose all of the work.

--


Gary


"RB Smissaert" <(E-Mail Removed)> wrote in message
news:%(E-Mail Removed)...
> There is one more, much more serious problem.
> If you run the indenter and there is a syntax error in your
> code then the indenter code can go in an endless loop, freezing it up.
> There is no other way out of this then to kill Excel with Ctrl + Alt + Del.
> This means losing all your work if you are working on an .xla project
> and possibly also if you were working on an .xls file.
> So, best always to run Debug, Compile before running the indenter.
> Not sure if this serious bug has been fixed in the latest version, but I sure
> have wasted several hours work due to this.
>
> RBS
>
> "Gary Keramidas" <GKeramidasATmsn.com> wrote in message
> news:(E-Mail Removed)...
>> installed this and found a problem. it seems to delete shortcut keys assigned
>> to a macro. i have control-shift-r assigned to a code module that print
>> previews a report.
>>
>> after running indent project, or opening the module and running indent
>> procedure, the shortcut is deleted. go to the options for the macro and it's
>> blank.
>>
>> just thought i'd pass it on. sent the author an email, too.
>>
>> it does do a good job, though.
>> --
>>
>>
>> Gary
>>
>>
>> "RB Smissaert" <(E-Mail Removed)> wrote in message
>> news:(E-Mail Removed)...
>>> http://www.oaltd.co.uk/Indenter/Default.htm
>>>
>>> RBS
>>>
>>>
>>> "Edward" <(E-Mail Removed)> wrote in message
>>> news:(E-Mail Removed)...
>>>> Is there a way to auto-indent code in the VB editor for macros in
>>>> Excel? That is, if my code looks like:
>>>>
>>>> if a = 7 then
>>>> call b
>>>> end if
>>>>
>>>> change it to:
>>>>
>>>> if a = 7 then
>>>> call b
>>>> end if
>>>>
>>>> Thanks.
>>>>
>>>> Edward
>>>>
>>>

>>
>>

>



 
Reply With Quote
 
 
 
Reply

Thread Tools
Rate This Thread
Rate This Thread:

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are Off


Similar Threads
Thread Thread Starter Forum Replies Last Post
Auto indent Jack Microsoft VC .NET 1 7th Apr 2008 03:02 AM
Can't get VS editor to indent case labels (set to Emacs) _DG Microsoft VC .NET 1 23rd Nov 2005 11:50 PM
auto indent Tim Murphy Microsoft Access 0 9th Jan 2005 10:21 PM
Problem with auto-indent, auto-complete, intellisense.... Robin Tucker Microsoft VB .NET 6 2nd Sep 2004 03:42 PM
Problem with auto-indent, auto-complete, intellisense.... Robin Tucker Microsoft C# .NET 3 29th Apr 2004 01:28 PM


Features
 

Advertising
 

Newsgroups
 


All times are GMT +1. The time now is 08:38 PM.