473,395 Members | 1,568 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,395 software developers and data experts.

Encapsulation

I have a piece of code I want to break off into smaller parts, put it
in a module and call the parts as needed. Simple? I don't know.

---------------------------------
Public Function AutomateIE1(IE As WebBrowser, strLink As String) As
String
IE.Navigate strLink

Do Until IE.ReadyState = READYSTATE_COMPLETE
Loop

Do
On Error Resume Next
Set htm = IE.Document
If Not htm Is Nothing Then Exit Do
Loop
Do
On Error Resume Next
Set frms = htm.Forms(0)
If Not frms Is Nothing Then Exit Do
Loop

End Function
----------------------------------

and the calling button processes the 'frms' further. How do I declare
the htm.forms type so I can pass it back. I know it's not a string.
Christian

May 11 '07 #1
1 2015
On 11 May 2007 14:34:55 -0700, ch************@yahoo.com wrote:

I'm not sure what you are trying to achieve, but you should put:
Option Explicit
at the top of each form. Tools>Options has an option to turn that on
permanently.
The type can be retrieved using the Object Browser (F2).

-Tom.

>I have a piece of code I want to break off into smaller parts, put it
in a module and call the parts as needed. Simple? I don't know.

---------------------------------
Public Function AutomateIE1(IE As WebBrowser, strLink As String) As
String
IE.Navigate strLink

Do Until IE.ReadyState = READYSTATE_COMPLETE
Loop

Do
On Error Resume Next
Set htm = IE.Document
If Not htm Is Nothing Then Exit Do
Loop
Do
On Error Resume Next
Set frms = htm.Forms(0)
If Not frms Is Nothing Then Exit Do
Loop

End Function
----------------------------------

and the calling button processes the 'frms' further. How do I declare
the htm.forms type so I can pass it back. I know it's not a string.
Christian
May 12 '07 #2

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

2
by: .pd. | last post by:
If I have a control that adds itself to its container, does that break encapsulation? Is it a bad thing? Here's what I mean: public class fred { public barny b; public fred() {
3
by: K.K. | last post by:
Consider the following code: >>>>>>>>>>> // Define an empty class public class ZorgleCollection : Dictionary<string, Zorgle> { } // Somewhere outside ZorgleCollection:
3
by: enchantingdb | last post by:
I have an exam tomorrow that covers the perceived advantages and disadvantages of object oriented programming, in particular polymorphism, inheritance and encapsulation. I know the advantages but...
6
by: William H. Burling | last post by:
I am not sure I understand encapsulation. I thought that one of the objectives in OOPs is to hide data structures from other objects so that they did not have to know how to unpack them. ...
5
by: jmsantoss | last post by:
Hi, This is a design question. I have a class named "DataBuffer" that stores some data. After "DataBuffer" is created it can not be modified. All the methods of "DataBuffer" are const as data...
47
by: Roger Lakner | last post by:
I often see operator implemented something like this: class Foo { ... }; class FooList { public: const Foo& operator (unsigned index) const {return array;}; Foo& operator (unsigned index) ...
32
by: bluejack | last post by:
Ahoy: For as long as I've been using C, I've vacillated on the optimal degree of encapsulation in my designs. At a minimum, I aggregate data and code that operate on that data into classlike...
16
by: copx | last post by:
I have recently read "Everything you ever wanted to know about C types" by Peter Seebach (1), and learned about incomplete types. Now, I realise the value of encapsulation, but I wonder whether it...
2
by: subramanian100in | last post by:
Is my following understanding correct ? Data abstraction means providing the interface - that is, the set of functions that can be called by the user of a class. Information hiding means...
0
by: Charles Arthur | last post by:
How do i turn on java script on a villaon, callus and itel keypad mobile phone
0
by: ryjfgjl | last post by:
In our work, we often receive Excel tables with data in the same format. If we want to analyze these data, it can be difficult to analyze them because the data is spread across multiple Excel files...
0
by: emmanuelkatto | last post by:
Hi All, I am Emmanuel katto from Uganda. I want to ask what challenges you've faced while migrating a website to cloud. Please let me know. Thanks! Emmanuel
1
by: nemocccc | last post by:
hello, everyone, I want to develop a software for my android phone for daily needs, any suggestions?
0
by: Hystou | last post by:
There are some requirements for setting up RAID: 1. The motherboard and BIOS support RAID configuration. 2. The motherboard has 2 or more available SATA protocol SSD/HDD slots (including MSATA, M.2...
0
marktang
by: marktang | last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However,...
0
by: Hystou | last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can...
0
jinu1996
by: jinu1996 | last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven...
0
by: Hystou | last post by:
Overview: Windows 11 and 10 have less user interface control over operating system update behaviour than previous versions of Windows. In Windows 11 and 10, there is no way to turn off the Windows...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.