Solved

Resize the web browser activex control in access 2000

Posted on 2004-09-19
5
1,335 Views
Last Modified: 2012-05-05
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
Comment
Question by:skyrise11
5 Comments
 
LVL 26

Accepted Solution

by:
Alan Warren earned 250 total points
ID: 12098950
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
 
LVL 34

Expert Comment

by:flavo
ID: 12098956
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
 
LVL 34

Expert Comment

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

Author Comment

by:skyrise11
ID: 12099539
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
 
LVL 6

Expert Comment

by:Plamodo
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 (?)
0

Featured Post

Independent Software Vendors: 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

Suggested Solutions

Phishing attempts can come in all forms, shapes and sizes. No matter how familiar you think you are with them, always remember to take extra precaution when opening an email with attachments or links.
Access developers frequently have requirements to interact with Excel (import from or output to) in their applications.  You might be able to accomplish this with the TransferSpreadsheet and OutputTo methods, but in this series of articles I will di…
Learn how to number pages in an Access report over each group. Activate two pass printing by referencing the pages property: Add code to the Page Footers OnFormat event to capture the pages as there occur for each group. Use the pages property to …
In Microsoft Access, when working with VBA, learn some techniques for writing readable and easily maintained code.

730 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