[Last Call] Learn how to a build a cloud-first strategyRegister Now

x
  • Status: Solved
  • Priority: Medium
  • Security: Public
  • Views: 1410
  • Last Modified:

Resize the web browser activex control in access 2000

Hi,

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?


Thanks
0
skyrise11
Asked:
skyrise11
1 Solution
 
Alan WarrenCommented:
Hi

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.

Alan
0
 
flavoCommented:
private sub form_load()
Me.WebBrowser.top = 0
 Me.WebBrowser.left = 0
Me.WebBrowser.height = Me.WindowHeight
 Me.WebBrowser.width = Me.WindowWidth

end sub

Dave
0
 
flavoCommented:
Tested with the Adobe control (dont have the web one installed)
0
 
skyrise11Author Commented:
flavo,

Then how do you open a web page to www.google.com using the adobe control?
I'm assuming you're refering to Adobe Acrobat Control for ActiveX.
0
 
PlamodoCommented:
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 (?)
0

Featured Post

Restore individual SQL databases with ease

Veeam Explorer for Microsoft SQL Server delivers an easy-to-use, wizard-driven interface for restoring your databases from a backup. No expert SQL background required. Web interface provides a complete view of all available SQL databases to simplify the recovery of lost database

Tackle projects and never again get stuck behind a technical roadblock.
Join Now