alt+F11,打开宏编辑器运行如下代码: Sub AAA() Dim R As Range, L As Long, S As String Application.ScreenUpdating = False S = "红" '要标记的字符 L = Len(S) For Each R In Selection If InStr(R, S) > 0 Then R.Characters(InStr(R, S), L).Font.Color = vbRed Next Applicat
*下面的代码是在alv字段中修改字段的内容,点击保存后就可以保存数据至数据表. TABLES: spfli. DATA: wa_fieldcat TYPE lvc_s_fcat , " 相当于工作区 i_fieldcat TYPE lvc_t_fcat , " 存放输出栏位名称的列表 i_layout TYPE lvc_s_layo . " 负责整个ALV的全局属性 DATA tab_spfli LIKE TABLE OF spfli WITH HEADER