有没有特别迅速的区别化学符号大小写还有下角标上角标之类的办法,就像平时打字一样的,哈哈?
可以下载相关软件,我现在用着化学金排挺好的。
先不表上下标,最后用word中的查找替换比较快的。
有一些简单的小程序也可以写方程式的
天天来此,激励自己!
天天来此,激励自己!
化学金排啊,还不错的,
凡事都有一个过程。做人最重要的第一对自己有信心;第二是要努力。只要你努力了,你也会拥有一切。
凡事都有一个过程。做人最重要的第一对自己有信心;第二是要努力。只要你努力了,你也会拥有一切。
引用:原帖由 yaohu 于 2009-1-10 15:32 发表 
有没有特别迅速的区别化学符号大小写还有下角标上角标之类的办法有没有特别迅速的区别化学符号大小写还有下角标上角标之类的办法,就像平时打字一样的,哈哈?
你如果在word或者WPS中进行编辑,可以使用快捷键,选中需要变成上标或者下标的文字或者符号,然后按"ctrl"键+"="键,选中的文字变成下标;按"ctrl"键+"shift"键+"="键,选中的文字变成上标。
也可以使用数学公式编辑器比较简单。
使用化学输入法、化学金排等更方便。
湖北长阳民族高中化学教师,养性修身,返璞归真
我们的雕龙区域
湖北长阳民高化学频道

有没有特别迅速的区别化学符号大小写还有下角标上角标之类的办法有没有特别迅速的区别化学符号大小写还有下角标上角标之类的办法,就像平时打字一样的,哈哈?
你如果在word或者WPS中进行编辑,可以使用快捷键,选中需要变成上标或者下标的文字或者符号,然后按"ctrl"键+"="键,选中的文字变成下标;按"ctrl"键+"shift"键+"="键,选中的文字变成上标。
也可以使用数学公式编辑器比较简单。
使用化学输入法、化学金排等更方便。
湖北长阳民族高中化学教师,养性修身,返璞归真
我们的雕龙区域
湖北长阳民高化学频道
'针对酸式磷酸盐化学式
U$ = Mid(Text1.Text, i, 6)
If U$ = "H2PO42" Or U$ = "H2PO43" Then
Selection.TypeText Text:="("
Selection.Font.Name = "Times New Roman"
Selection.TypeText Text:=m$
Selection.Font.subScript = wdToggle
Selection.TypeText Text:=Mid(Text1.Text, i + 1, 1)
Selection.Font.subScript = wdToggle
Selection.TypeText Text:=Mid(Text1.Text, i + 2, 1)
Selection.Font.subScript = wdToggle
Selection.Font.subScript = wdToggle
Selection.TypeText Text:=Mid(Text1.Text, i + 3, 1)
Selection.Font.subScript = wdToggle
Selection.TypeText Text:=Mid(Text1.Text, i + 4, 1)
Selection.Font.subScript = wdToggle
Selection.TypeText Text:=")"
Selection.Font.subScript = wdToggle
Selection.TypeText Text:=Mid(Text1.Text, i + 5, 1)
Selection.Font.subScript = wdToggle
Selection.Font.Name = "Times New Roman"
i = i + 5
GoTo LXF
End If
U$ = Mid(Text1.Text, i, 6)
If U$ = "H2PO42" Or U$ = "H2PO43" Then
Selection.TypeText Text:="("
Selection.Font.Name = "Times New Roman"
Selection.TypeText Text:=m$
Selection.Font.subScript = wdToggle
Selection.TypeText Text:=Mid(Text1.Text, i + 1, 1)
Selection.Font.subScript = wdToggle
Selection.TypeText Text:=Mid(Text1.Text, i + 2, 1)
Selection.Font.subScript = wdToggle
Selection.Font.subScript = wdToggle
Selection.TypeText Text:=Mid(Text1.Text, i + 3, 1)
Selection.Font.subScript = wdToggle
Selection.TypeText Text:=Mid(Text1.Text, i + 4, 1)
Selection.Font.subScript = wdToggle
Selection.TypeText Text:=")"
Selection.Font.subScript = wdToggle
Selection.TypeText Text:=Mid(Text1.Text, i + 5, 1)
Selection.Font.subScript = wdToggle
Selection.Font.Name = "Times New Roman"
i = i + 5
GoTo LXF
End If
是VB代码么?
VB6.0的还是VB .Net的?

VB6.0的还是VB .Net的?

VBA代码(WORD里)!象化学金排,化学速排,极速化学等都是用类似的处理方法!我没有正规学习VB,只是自学了一点VBA!
是对哪个对象的什么事件?弄好了给你加威望!



窗体里的文字框!
下面是一键上下标,模块里:
Sub 智能上下标()
Dim x, Y, j, k As Integer
Dim m, n As Long
Dim char As String
x = Selection.Start
Y = Selection.End
For j = x To Y Step 1
Selection.Start = j - 1
Selection.End = j
char = Selection.Text
n = InStr("abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ))]", char)
If n <> 0 Then
Selection.Start = j
Selection.End = j + 1
char = Selection.Text
m = InStr("0123456789", char)
If m <> 0 Then
k = 2
Selection.Font.subScript = wdToggle
Selection.Start = j
Selection.End = j + k
char = Selection.Characters(k).Text
m = InStr("0123456789-+", char)
Do While m <> 0
If char = "+" Or char = "-" Then
Selection.Start = j + k
Selection.End = j + k + 1
char = Selection.Text
m = InStr("0123456789abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ(([", char)
If m <> 0 Then
GoTo LINE1
Else
Selection.Start = j - 1
Selection.End = j + k
char = Selection.Characters(1).Text
End If
If char = "O" Or char = "H" Then '与line1共同作用以防止将NH4+、AlO2-
Selection.Start = j
Selection.End = j + 1
Selection.Font.subScript = wdToggle
Selection.Font.subScript = wdToggle
Selection.Start = j + 1
Selection.End = j + k
Selection.Font.Superscript = wdToggle
GoTo LINE1
End If
Selection.Start = j
Selection.End = j + k
Selection.Font.Superscript = wdToggle
Selection.Font.Superscript = wdToggle
GoTo LINE1
End If
k = k + 1
Selection.Start = j
Selection.End = j + k
char = Selection.Characters(k).Text
If char = "-" Or char = "+" Then
Selection.Start = j
Selection.End = j + k - 2
Selection.Font.subScript = wdToggle
Selection.Font.subScript = wdToggle
Selection.Start = j + k - 2
Selection.End = j + k
Selection.Font.Superscript = wdToggle
GoTo LINE1
Else
m = InStr("0123456789", char)
End If
Loop
Selection.Start = j
Selection.End = j + k - 1
Selection.Font.subScript = wdToggle
Selection.Font.subScript = wdToggle
End If
LINE1:
Selection.Start = j
Selection.End = j + 1
char = Selection.Text
m = InStr("-", char)
If m <> 0 Then
Selection.Start = j + 1
Selection.End = j + 2
char = Selection.Text
m = InStr("0123456789abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ(([", char)
If m = 0 Then
Selection.Start = j
Selection.End = j + 1
Selection.Font.Superscript = wdToggle
End If
End If
m = InStr("+", char)
If m <> 0 Then
Selection.Start = j + 1
Selection.End = j + 2
char = Selection.Text
m = InStr("0123456789abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ(([+", char)
If m = 0 Then
Selection.Start = j
Selection.End = j + 1
Selection.Font.Superscript = wdToggle
End If
End If
End If
Next j
Selection.Start = Y
Selection.End = Y
End Sub
下面是一键上下标,模块里:
Sub 智能上下标()
Dim x, Y, j, k As Integer
Dim m, n As Long
Dim char As String
x = Selection.Start
Y = Selection.End
For j = x To Y Step 1
Selection.Start = j - 1
Selection.End = j
char = Selection.Text
n = InStr("abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ))]", char)
If n <> 0 Then
Selection.Start = j
Selection.End = j + 1
char = Selection.Text
m = InStr("0123456789", char)
If m <> 0 Then
k = 2
Selection.Font.subScript = wdToggle
Selection.Start = j
Selection.End = j + k
char = Selection.Characters(k).Text
m = InStr("0123456789-+", char)
Do While m <> 0
If char = "+" Or char = "-" Then
Selection.Start = j + k
Selection.End = j + k + 1
char = Selection.Text
m = InStr("0123456789abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ(([", char)
If m <> 0 Then
GoTo LINE1
Else
Selection.Start = j - 1
Selection.End = j + k
char = Selection.Characters(1).Text
End If
If char = "O" Or char = "H" Then '与line1共同作用以防止将NH4+、AlO2-
Selection.Start = j
Selection.End = j + 1
Selection.Font.subScript = wdToggle
Selection.Font.subScript = wdToggle
Selection.Start = j + 1
Selection.End = j + k
Selection.Font.Superscript = wdToggle
GoTo LINE1
End If
Selection.Start = j
Selection.End = j + k
Selection.Font.Superscript = wdToggle
Selection.Font.Superscript = wdToggle
GoTo LINE1
End If
k = k + 1
Selection.Start = j
Selection.End = j + k
char = Selection.Characters(k).Text
If char = "-" Or char = "+" Then
Selection.Start = j
Selection.End = j + k - 2
Selection.Font.subScript = wdToggle
Selection.Font.subScript = wdToggle
Selection.Start = j + k - 2
Selection.End = j + k
Selection.Font.Superscript = wdToggle
GoTo LINE1
Else
m = InStr("0123456789", char)
End If
Loop
Selection.Start = j
Selection.End = j + k - 1
Selection.Font.subScript = wdToggle
Selection.Font.subScript = wdToggle
End If
LINE1:
Selection.Start = j
Selection.End = j + 1
char = Selection.Text
m = InStr("-", char)
If m <> 0 Then
Selection.Start = j + 1
Selection.End = j + 2
char = Selection.Text
m = InStr("0123456789abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ(([", char)
If m = 0 Then
Selection.Start = j
Selection.End = j + 1
Selection.Font.Superscript = wdToggle
End If
End If
m = InStr("+", char)
If m <> 0 Then
Selection.Start = j + 1
Selection.End = j + 2
char = Selection.Text
m = InStr("0123456789abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ(([+", char)
If m = 0 Then
Selection.Start = j
Selection.End = j + 1
Selection.Font.Superscript = wdToggle
End If
End If
End If
Next j
Selection.Start = Y
Selection.End = Y
End Sub
最好能截图说明。
这段代码由于对象和事件不明,因此在VB6环境下运行不通过。

这段代码由于对象和事件不明,因此在VB6环境下运行不通过。

按你给出的代码,把整段Sub过程copy入Form1下的通用声明段,仅将名称由“智能上下标”变为“UD”,在RichTextbox1的Change事件下Call了UD这一Sub过程。
还有,若把代码输入模块,那么是类模块还是普通模块?这些都应指明。

附件: 您所在的用户组无法下载或查看附件

还有,若把代码输入模块,那么是类模块还是普通模块?这些都应指明。

附件: 您所在的用户组无法下载或查看附件

WORD 中的普通模块!