I have 5 mshflexgrids on a form 3 are contained in pictureboxs I am trying adjust the grids widths, based on the column widths and am trying to also set the picture widths as optional argument. The code below works fine if i pass the picture argument, but fails if with don't with a "Object variable not set" error message. How can i correct this?
Sub AdjustGridWidth(grd As MSHFlexGrid, Optional pic As PictureBox)
Dim i As Integer
Dim iWidth As Integer
For i = 1 To .Cols - 1
iWidth = iWidth + .ColWidth(i) + 13
.Width = iWidth
Select from freelancers specializing in everything from database administration to programming, who have proven themselves as experts in their field. Hire the best, collaborate easily, pay securely and get projects done right.
Displaying an arrayList in a listView using the default adapter is rarely the best solution. To get full control of your display data, and to be able to refresh it after editing, requires the use of a custom adapter.
As developers, we are not limited to the functions provided by the VBA language. In addition, we can call the functions that are part of the Windows operating system. These functions are part of the Windows API (Application Programming Interface). U…
Get people started with the process of using Access VBA to control Outlook using automation, Microsoft Access can control other applications. An example is the ability to programmatically talk to Microsoft Outlook. Using automation, an Access applic…