auto group the config file

Dim levalmax As Integer

Sub auto_level_exit()

oldrow = 0

linmax = Sheet1.UsedRange.Rows.Count

colonmax = Sheet1.UsedRange.Columns.Count

‘MsgBox "auto_level_exit oldrow is : " & oldrow

i = 100

levalmax = 1

For i = linmax To 1 Step -1

str1 = Sheet1.Cells(i, 1)

str2 = Right(str1, 5)

If str2 = "exit " Or str2 = " exit" Then

oldrow = newrow

newrow = i

For j = i - 1 To 1 Step -1

str3 = Sheet1.Cells(j, 1)

str4 = Left(str3, Len(str1) - 1)

str5 = Right(str4, 4)

If str5 <> "    " Then

oldrow = j + 1

j = 0

If oldrow <> newrow Then

Rows(oldrow & ":" & newrow).Select

Selection.Rows.Group

Exit For

End If

End If

Next

‘get number of space to calculate the level

spacelen = Len(str1)

levelnum = spacelen / 4

If levalmax < levelnum Then

levalmax = levelnum

End If

End If

Next

End Sub

Sub auto_level_echo()

oldrow = 0

linmax = Sheet1.UsedRange.Rows.Count

colonmax = Sheet1.UsedRange.Columns.Count

‘MsgBox "oldrow is : " & oldrow

For i = 1 To linmax

str1 = Sheet1.Cells(i, 1)

str2 = Left(str1, 6)

If str2 = "  echo" Then

oldrow = newrow

newrow = i

If oldrow <> 0 Then

Rows(oldrow + 1 & ":" & newrow - 2).Select

Selection.Rows.Group

End If

End If

If i = linmax - 7 Then

Rows(newrow + 1 & ":" & i).Select

Selection.Rows.Group

End If

Next

End Sub

Sub auto_nolevel_echo()

oldrow = 0

linmax = Sheet1.UsedRange.Rows.Count

colonmax = Sheet1.UsedRange.Columns.Count

‘MsgBox "oldrow is : " & oldrow

‘rowlevel = Sheet1.Outline.SummaryRow

‘colomnlevel = Sheet1.Outline.SummaryColumn

For i = 1 To levalmax - 1 ‘ linmax

Rows(1 & ":" & linmax).Select

Selection.Rows.Ungroup

Next

levalmax = 0

End Sub

Sub auto_level_config()

Dim i, j As Integer

Dim str1, str2, str3 As String

Dim linemax, colonmax As Integer

linmax = Sheet1.UsedRange.Rows.Count

colonmax = Sheet1.UsedRange.Columns.Count

‘MsgBox "line is: " & linmax & "column is " & colonmax

oldrow = 1

newrow = 5

auto_level_echo

auto_level_exit

End Sub

Sub nogroup()

‘ nogroup Macro

Rows("1742:1747").Select

Selection.Copy

Application.CutCopyMode = False

Selection.Rows.Ungroup

End Sub

时间: 2024-11-10 00:53:45

auto group the config file的相关文章

MySQL - Found option without preceding group in config file

1.1.1 现象 启动MYSQL超时,windows提示错误,在服务中MYSQL状态一直处于starting状态,执行MYSQL命令,出现如下错误信息: error:found option without preceding group in config file:E:\webserver\mysql5\my.ini at line :1 fatal error in defaults handling .program aborted. 1.1.2 原因 配置文件My.ini的存储格式不正

Found option without preceding group in config file

报错: error: Found option without preceding group in config file: /etc/my.cnf at line: 1 解决方法: 在mysql配置文件最上面加一行 [mysqld]

vsftpd: 500 OOPS: missing value in config file 解决方法

今天项目需求要弄个vsftpd,根据以前的配置加了下, 在启动的时候居然出现错误,瞬间蛋碎一地了: [[email protected] vsftpd]# /etc/init.d/vsftpd restart Shutting down vsftpd:                                      [FAILED] Starting vsftpd for vsftpd: 500 OOPS: missing value in config file for:      

linux下FTP拒绝(ftp: connect: Connection refused,500 OOPS: cannot read config file)

使用Ubunto15.0.4环境下,使用APT命令下载的vsftpd程序 在/etc/vsftpd.conf中开启匿名用户权限(anonymous_enable=YES),重新启动vsftpd后,在用ftp localhost,竟然会报ftp: connect: Connection refused的错误,使用sudo service vsftpd start,或sudo /etc/init.d/vsftpd start,竟然启动不起来.报500 OOPS: cannot read config

error in config file &quot;/etc/rabbitmq/rabbitmq.config&quot;

记录一次RabbitMQ配置文件配置错误 error信息: [email protected]:/usr/share/doc/rabbitmq-server$ sudo /usr/lib/rabbitmq/bin/rabbitmq-server {"could not start kernel pid",application_controller,"error in config file \"/etc/rabbitmq/rabbitmq.config\"

Create a custom configSection in web.config or app.config file

config file: <?xml version="1.0" encoding="utf-8" ?> <configuration> <configSections> <section name="FileDepend" type="TestConsole.FileDepend,TestConsole"/> </configSections> <FileDe

iptables开启警告 iptables: No config file. &nbsp; &nbsp; &nbsp; &nbsp; [WARNING]!

开启iptables警告! iptables: No config file.                                  [WARNING] 原因 没有iptables这个配置文件. 解决方式: 任意添加一条策略,然后保存,启动即可! eg: iptables -A INPUT -怕tcp --dport 80 -j ACCEPT services iptables save services iptables start

CRITICAL:yum.cli:Config Error: Error accessing file for config file:///etc/yum.conf

1,下载最新的yum-3.2.28.tar.gz并解压 #wget http://yum.baseurl.org/download/3.2/yum-3.2.28.tar.gz#tar xvf yum-3.2.28.tar.gz 2,进入目录,运行安装 #cd yum-3.2.28#./yummain.py install yum如果提示错误: CRITICAL:yum.cli:Config Error: Error accessing file for config file:///etc/ 是

vsftpd 启动 vsftpd:500 OOPS: bad bool value in config file for: guest_enable

不然启动时会涌现毛病,举个例子 guest_enable=YES  后面出现空格,就会出现 为 vsftpd 启动 vsftpd:500 OOPS: bad bool value in config file for: guest_enable 修改以后 为 vsftpd 启动 vsftpd:500 OOPS: unrecognised variable in config file: allow_writeable_chroot 问题还没解决 ,没有空格还是报500错误