0
我有一个UserForm,我不想复制三个不同的值,并将它们放在我的新表中,并在每个值的前面加上一个解释,但它不起作用,有人能帮我理解为什么吗?如何将UserForm中的值导出到新的Excel表单中?
Private Sub cmbExport_Click()
Sheets.Add(After:=Sheets(Sheets.Count)).Name = "Export"
Export.Range("A1").Value = "Riskpremie"
Export.Range("A2").Value = "Teknisk premie"
Export.Range("A3").Value = "Slutpremie"
Export.Range("B1").Value = TxtRiskpremie.Value
Export.Range("B2").Value = TxtTeknpremie.Value
Export.Range("B3").Value = txtSlutpremie.Value
End Sub
预先感谢您!
尝试使用'表( “Export”)。Range(“A1”)。Value'而不是'Export.Range..'。 – Soulfire
应该总是说错误发生在哪个代码行。你应该使用'WorkSheets(“Export”)。Range(“A1 ......)'bla-bla – MacroMarc