Resize the web browser activex control in access 2000

Posted on 2004-09-19
Last Modified: 2012-05-05

I want to resize the Microsoft web browser activex control I have in an access form, so that it will be the same size as the form.

I put in the following code in vba
    Me.WebBrowser.height = Me.WindowHeight
    Me.WebBrowser.width = Me.WindowWidth

But the control does not take on height and width values of the form. Is this a problem with the activex control? How do I fix it?

Question by:skyrise11
LVL 26

Accepted Solution

Alan Warren earned 250 total points
ID: 12098950

Get that problem all the time in vba, the only fix I have found for it is to delete the the control and create it again, ensuring to draw it the size you want when first creating it.

This is not an issue in VB, only in VBA.

LVL 34

Expert Comment

ID: 12098956
private sub form_load() = 0
 Me.WebBrowser.left = 0
Me.WebBrowser.height = Me.WindowHeight
 Me.WebBrowser.width = Me.WindowWidth

end sub

LVL 34

Expert Comment

ID: 12098960
Tested with the Adobe control (dont have the web one installed)

Author Comment

ID: 12099539

Then how do you open a web page to using the adobe control?
I'm assuming you're refering to Adobe Acrobat Control for ActiveX.

Expert Comment

ID: 12112352
I agree with allanwarren.  Every time I need to resize the webcontrol, I delete the old one and draw a new one.  Doesn't seem to be a way around this - without using a different type of control (?)

Featured Post

Complete VMware vSphere® ESX(i) & Hyper-V Backup

Capture your entire system, including the host, with patented disk imaging integrated with VMware VADP / Microsoft VSS and RCT. RTOs is as low as 15 seconds with Acronis Active Restore™. You can enjoy unlimited P2V/V2V migrations from any source (even from a different hypervisor)

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

QuickBooks® has a great invoice interface that we were happy with for a while but that changed in 2001 through no fault of Intuit®. Our industry's unit names are dictated by RUS: the Rural Utilities Services division of USDA. Contracts contain un…
In a multiple monitor setup, if you don't want to use AutoCenter to position your popup forms, you have a problem: where will they appear?  Sometimes you may have an additional problem: where the devil did they go?  If you last had a popup form open…
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…
In Microsoft Access, learn how to “cascade” or have the displayed data of one combo control depend upon what’s entered in another. Base the dependent combo on a query for its row source: Add a reference to the first combo on the form as criteria i…

813 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question

Need Help in Real-Time?

Connect with top rated Experts

12 Experts available now in Live!

Get 1:1 Help Now