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
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
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

Technology Partners: We Want Your Opinion!

We value your feedback.

Take our survey and automatically be enter to win anyone of the following:
Yeti Cooler, Amazon eGift Card, and Movie eGift Card!

Question has a verified solution.

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

The Windows Phone Theme Colours is a tight, powerful, and well balanced palette. This tiny Access application makes it a snap to select and pick a value. And it doubles as an intro to implementing WithEvents, one of Access' hidden gems.
Microsoft Access is a place to store data within tables and represent this stored data using multiple database objects such as in form of macros, forms, reports, etc. After a MS Access database is created there is need to improve the performance and…
In Microsoft Access, learn the trick to repeating sub-report headings at the top of each page. The problem with sub-reports and headings: Add a dummy group to the sub report using the expression =1: Set the “Repeat Section” property of the dummy…
Do you want to know how to make a graph with Microsoft Access? First, create a query with the data for the chart. Then make a blank form and add a chart control. This video also shows how to change what data is displayed on the graph as well as form…

717 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