What does Visual Basic without Forms called as? - vba

I'm a mechanical engineering learning how to automate NX software which uses VB.net language. But it won't allows to use a userform like in MS Excel Macro. For an example, if I need an input box I can't drag it from userform menu instead I will use InputBox() code. My doubt is what does this kind of Visual basic program is known as? I need the exact word for this. Kindly help me. Thanks in Advance!
I tried Googling but I don't got anything.

Related

Programming a command button in Visio 2013 using VBA to open the layer properties window

This is an issue I have been trying to solve for some time now. I do not know VBA, I am still trying to learn. I have diagrams I created for work in Visio 2013 and the diagrams use layers. I am trying to code in a command button to open up the layer properties window for the active page the user clicks the button on. I have perused through the Microsoft documentations page for Visio but I cannot find out how to reference the layer properties window as an object and how to run it using VBA. This is what I have tried so far with different iterations;
Private Sub CommandButton1_Click()
Visio.Page.Layers.Properties("NameofPage").Run
End Sub
I truly appreciate any help and guidance on this matter. I am not even sure what I am doing wrong.
in ms visio you can show layer properties window only for active page !
Application.DoCmd (visCmdLayerSetupDlg)

Can We use the VB6 PictureBox in VB.NET?

I have a Migrated Project which contains PictureBox Events.When it is migrated to VB.NET 2008 some events are converted which are not correct.Because the PictureBox in VB.NET is different to VB6 PictureBox.I want to know one thing that can we use the Same picture box in VB.NET also.I think which may help us to use the same events.Can we do like this ? It contains some events like Picture_paint,AutoRedraw,setPoint etc.It has some Twips and Pixel Calculation also.
Will this help ?Do we have any upgraded control in .NET equivalent to Picture box of VB6?
This is not the right way to accomplish your goal. Try to upgrade to the new PictureBox in VB.Net.
Yes, they are different, but, you can hardly say that the VB.Net version is less capable than the VB6 version.
If you upgrade, do it fully and you will not regret the decision in the future.
This MSDN link exposes the difference between the two controls
Converting from VB6 to VB.Net is not easy process almost all your events will not work you need to find equivalent events in vb.Net
Go with this link
As already mentioned the controls in VB6 and VB.NET work differently so upgrading line for line is not really possible.
As a hlaf way house you could create an ActiveX Control (OCX) in VB6 containing your picturebox which raised the events required to the application and then use this in VB.NET
This tutorial may help you to get started

How can i access data in Excel sheet using vb?

Am devoloping a windows form application which need to retreive a particular column from Excel sheet and i want to display that data in a dropdown menu.
As i am newbie to Visual Basic please explain end to end process with code.
Thanks,
Snehal
You will need to use Microsoft Office Interop. You can find an example at http://dotnetperls.com/excel
Also, this page at C-Sharp Corner might be exactly what you're looking for.

How to implement Custom Ribbon resizing in Excel 2007?

I'm working in a ribbon project for Excel 2007, using Visual Studio 2008 and VSTO, I'm trying to make my ribbon's groups collapse into galleries when I resize the Excel window, this is a functionality that the other tabs in the ribbon have (the tabs that come with Excel).
At first, I thought this wouldn't be that much difficult, I imagine that it would be like a property from the ribbon, but I have researched a lot about it and it seems that it is not that much easier.
I was looking at this article, there is a post from a guy called "Mike McGavin", he is asking for the same thing that I'm, and the guy that answer his question tells him that auto resize is not current functionality on custom groups/controls.
Now, that post is 1.5 years old...so I'm hoping something new has been out there, maybe some of you know something about it.
Thanks.
It's in 2010. Scroll down to Custom Group Auto-Scaling section.
http://blogs.technet.com/office2010/archive/2009/11/03/ui-extensibility-in-office-2010.aspx

Recording VBA code in Power Point 2007?

In Office 2003 if I recall correctly you had a "record macro" option.
In PowerPoint 2007, under View->Macros, you get a macro box. None of the options are "record". If you put in a name, you can select "create", but that takes you to the VB editor. If you edit the slide manually, it does not generate the VBA code.
You do not have the option of defining VBA code by a sequence of keystrokes/mouseclicks/whatever.
It seems you are out of luck What happened to the macro recorder?
I have since read:
Contrary to what Microsoft says, use
the legacy keyboard commands Alt+T, M,
R to start the macro recorder in
Powerpoint 2007, and use the same
keyboard combination to stop
recording.
The macro recorder works using this shortcut, but you should note that it won't record for features that were added after Powerpoint 2003 (and this includes anything to do with the new charting engine that was introduced in PPT 2007).
This isn't about arrogance, it's simply that 2007 was a BIG rewrite for all of the Office applications. To ensure that the product went out on time, some features had to be de-scoped and the macro recorder was one of them, since Powerpoint automation is used by a relatively small user group when compared with Excel or Word automation.
Powerpoint add-ins are common, but they're built by developers and although it's handy we can live without the macro recorder. Visual Studio isn't necessary for building Office Add-Ins, although it does have advantages. What you really need is someone competent in building Office solutions.
Both answers are correct the macro recorder can be activated but it is pretty much useless since it records little to nothing. It seems that the ppt programmers at MS really take issue with customers being able to customize powerpoint. Executing repetitive tasks or just formatting an object the way you want it (and not being stuck with the pre-cooked options that MS in its infinite wisdom or shall I say bloody arrogance believes is all you need) has become almost impossible. The only way out is to program the ribbon or create an add-in which has to be done in Visual Studio (VBA will not cut it).
The Keystroke activated record doesen't work it creates an empty macro with very few(usually none!) of the actual actions that you performed.