Quote:
How to put a VBA code inside command button of excel sheet using VB.NET?
"<vba code="" inside="" command="" button"="" does="" not="" exist.="" a="" button="" can="" only="" call="" subroutine="" by="" its="" name.
<pre="" lang="vb">
xlWorkSheet1.commandbutton1.caption = "Generate Sheet 2"
xlWorkSheet1.commandbutton1.Height = 33
xlWorkSheet1.commandbutton1.Width = 125
xlWorkSheet1.commandbutton1.font.size = "12"
You are already setting some properties of
commandbutton1
, linking some code to a button event is just setting another property, why is it so difficult?