Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 34
Default auto-indent in vb editor

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

  #2   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 2,452
Default auto-indent in vb editor

http://www.oaltd.co.uk/Indenter/Default.htm

RBS


"Edward" wrote in message
ps.com...
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


  #3   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 2,494
Default auto-indent in vb editor

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" wrote in message
...
http://www.oaltd.co.uk/Indenter/Default.htm

RBS


"Edward" wrote in message
ps.com...
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




  #4   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 2,452
Default auto-indent in vb editor

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
...
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" wrote in message
...
http://www.oaltd.co.uk/Indenter/Default.htm

RBS


"Edward" wrote in message
ps.com...
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





  #5   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 2,494
Default auto-indent in vb editor

thanks for the heads up.

--


Gary


"RB Smissaert" wrote in message
...
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
...
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" wrote in message
...
http://www.oaltd.co.uk/Indenter/Default.htm

RBS


"Edward" wrote in message
ps.com...
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









  #6   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 2,494
Default auto-indent in vb editor

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" wrote in message
...
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
...
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" wrote in message
...
http://www.oaltd.co.uk/Indenter/Default.htm

RBS


"Edward" wrote in message
ps.com...
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
Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Posting Rules

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


Similar Threads
Thread Thread Starter Forum Replies Last Post
Indent Indent Excel Worksheet Functions 2 January 12th 10 10:13 PM
How switch off space auto-completion in VBA editor? [email protected] Excel Programming 8 November 21st 09 07:51 PM
QUERY: auto clean VB code editor? KevinGPO Excel Programming 1 November 29th 05 11:12 AM
Indent within a row marilyn Excel Worksheet Functions 3 May 5th 05 05:50 PM
Disable auto editor formatting Niklas[_3_] Excel Programming 1 August 14th 03 12:51 PM


All times are GMT +1. The time now is 01:03 PM.

Powered by vBulletin® Copyright ©2000 - 2025, Jelsoft Enterprises Ltd.
Copyright ©2004-2025 ExcelBanter.
The comments are property of their posters.
 

About Us

"It's about Microsoft Excel"