Showing posts with label userform. Show all posts
Showing posts with label userform. Show all posts

Wednesday, August 17, 2011

UserForm resizer

I recently use below codes to make Userform in Excel resizeable:

'Done in Excel
Private Sub SetFormStyle()

Dim lStyle As Long, hMenu As Long

'Have we got a form to set?
If mhWndForm = 0 Then Exit Sub

'Get the basic window style
lStyle = GetWindowLong(mhWndForm, GWL_STYLE)

'Build up the basic window style flags for the form
SetBit lStyle, WS_CAPTION, mbCaption
SetBit lStyle, WS_SYSMENU, mbSysMenu
SetBit lStyle, WS_THICKFRAME, mbSizeable
SetBit lStyle, WS_MINIMIZEBOX, mbMinimize
SetBit lStyle, WS_MAXIMIZEBOX, mbMaximize

Monday, August 1, 2011

Works fine on my Excel with Userform

Now I have new ms-excel that I’ve copied this codes from Vb-project.com thanks to programer…, I do copy to this:
This description only touches on the most interesting parts of the program. Download it to see the details.You can click the links on the WebBrowser to navigate to a Web page, or enter a URL and click the Go button to navigate there. The following code shows how the program navigates.
Private Sub cmdGo_Click()
    On Error GoTo BadNavigate
    wbrWebSite.Navigate txtUrl.Text
    Exit Sub