-1
& chr(38)のように&をコード化しようとしていますが、その根底には単語の基礎があります。このための任意のソリューションですか?VBAから&ExcelにExcelを印刷するには
Private Sub createMenu()
'define the variables
Dim mnuDownload1 As Menu
'create the menue bar
With MenuBars(xlWorksheet)
.Reset
.Menus.Add "Import", 1
'define the menue bar
Set mnuDownload1 = MenuBars(xlWorksheet).Menus("Import")
'for each defined menu bar at the sub item , the first "" is the name of the item. The second "" is the macro name
With mnuDownload1.MenuItems
.AddMenu Caption:="P&S"
.Item("P&S").MenuItems.Add "Exclude P" & Chr(38) & "S", "changes"
End With
End With
End Sub
これはすべてコードですか?あなたがそれを書いたか、またはchr(38)はmsgboxに "&"を表示します – QHarr
あなたのコードはうまく動作します。 &はあなたが望むように表示します。 – braX
申し訳ありませんが私は上記を更新しました – Lowpar