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

What Is Threat Intelligence?

Threat intelligence is often discussed, but rarely understood. Starting with a precise definition, along with clear business goals, is essential.

Join & Write a Comment

When you are entering numbers in a speadsheet, and don't remember what 6×7 is, you just type “=6*7" instead. It works in every cell! This is not so in Access. To enter the elusive 42 in a text box, you have to find a calculator, and then copy the re…
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…
Familiarize people with the process of utilizing SQL Server views from within Microsoft Access. Microsoft Access is a very powerful client/server development tool. One of the SQL Server objects that you can interact with from within Microsoft Access…
Access reports are powerful and flexible. Learn how to create a query and then a grouped report using the wizard. Modify the report design after the wizard is done to make it look better. There will be another video to explain how to put the final p…

744 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

13 Experts available now in Live!

Get 1:1 Help Now