use stu1
go 4
scatter memv &&将所有字段值,读入相同名称的内存变量
use stu2
go 8
gather memv &&将所有字段名字相同的内存变量值,写入表字段
*关键是scatter和gather这两条,这种方法最方便快捷
*如果有memo字段,则scatter memv memo......
*你蔽槐查查这两条指令 *** 作手册。
*效果怎么样,弯斗你试试就知道了
C1:C2放95%和27%,D2放93%,插入以下宏并执行:(渐变的那一段仔扰代码是我录制的,如果不符合锋旁你的要求,可银戚橡以自己录制一下,在替代我的:)Sub liyoushang()
For Each i In [c1:c2]
If i >[d2] Then
i.Select
With Selection.Interior
.Pattern = xlPatternLinearGradient
.Gradient.Degree = 0
.Gradient.ColorStops.Clear
End With
With Selection.Interior.Gradient.ColorStops.Add(0)
.Color = 255
.TintAndShade = 0
End With
With Selection.Interior.Gradient.ColorStops.Add(1)
.ThemeColor = xlThemeColorDark1
.TintAndShade = 0
End With
Else
i.Select
With Selection.Interior
.Pattern = xlPatternLinearGradient
.Gradient.Degree = 0
.Gradient.ColorStops.Clear
End With
With Selection.Interior.Gradient.ColorStops.Add(0)
.Color = 5287936
.TintAndShade = 0
End With
With Selection.Interior.Gradient.ColorStops.Add(1)
.ThemeColor = xlThemeColorDark1
.TintAndShade = 0
End With
End If
Next
End Sub
欢迎分享,转载请注明来源:内存溢出
评论列表(0条)