|
[广告] Excel易用宝 - 提升Excel的操作效率 · Excel / WPS表格插件 ★ 免费下载 ★ ★ 使用帮助★
因公司装B,不能再使用OFFICE改用WPS2012专业增强版自带VBA模块,多年累积下来的EXCEL文档需用WPS ET运行,但存在部分兼容问题,网上WPS论坛居然少之又少,放在这里,望有大神出手相助一下.主要是
combobox1的 .RowSource = ws.Name & "!A2:A31"取值失败,
Private Sub UserForm_Initialize()
On Error Resume Next
Dim ws As Worksheet
Set ws = ThisWorkbook.Sheets("sheet2")
With ComboBox1
.RowSource = ws.Name & "!A2:A31"
coluncount = 1
.ColumnHeads = False
.ControlTipText = "双击获取当前年月"
End With
With ComboBox2
.RowSource = ws.Name & "!c2:c23"
coluncount = 1
.ColumnHeads = False
End With
Set ws = Nothing
End Sub
编译能通过,但运行是后窗体中的复合框是没有值,但在EXCEL中完全没问题,盼有高手路过!!!
|
|