How much scope is in VBA Excel

Determine the scope of the table size
authormessage
remper
Excel VBA SemiPro


Posted:
Jul 19, 2006, 11:10 am
First name:

       

Hi.

How can I determine the range of a table using VBA ???

greeting
Remper
Nepumuk
VB / VBA programmer


Posted:
19 Jul 2006, 11:12 am
Call name: Max
Place of residence: Dusseldoof
remper
Excel VBA SemiPro


Posted:
Jul 19, 2006, 11:34 am
First name:

       

Hi Nepumuk,

I would like to determine the area of ​​the worksheet in which the table is located. This sheet is edited by several people, so rows and columns are added.

Example:

A B C D E
1 Name Müller Schulze Hoffmann
2 car new old new
3 TV old new

==> Here the area A1: D3

greeting
Michael
Karl_pb
Beginner


Posted:
Jul 19, 2006 at 11:45 am
First name:
Place of residence: at home
remper
Excel VBA SemiPro


Posted:
19 Jul 2006, 13:08
First name:


       

GREAT THING! Thanks.

how can I read out the address?

Have now managed to mark the area used. Then I would like to hand over the coordination to two more variables: Variable1 (point of selection, top left) and Variable2 (point of selection, bottom right).

Tried something here, but it doesn't work:

Code:
Worksheets ("Query Table"). Activate
ActiveSheet.UsedRange.Select 'Determine table size
search area = Selection.Address
search area1 = Left (user area, 2)
search area2 = Right (user area, 2)


Do you have an idea?

greeting
Michael
Case
Coder


Posted:
Jul 19, 2006, 1:19 pm
Call name: Case
Place of residence: Schwäbisch Hall
       

Hello,

something to play with. Mark the area and let go of one or the other:

Code:
Option Explicit

Public Sub First_Last ()
MsgBox Selection.Row
MsgBox Selection.Rows.Count + Selection.Row - 1
End Sub

Public Sub Information ()
Dim str area As String
Dim strLinksAbove As String
Dim str Right Down As String
Dim strTop As Long
Dim strLow Down As Long

If Selection.Count <2 Or Selection.Areas.Count> 1 Then
MsgBox "Please mark more than one cell!" & Chr (13) & "And no disjointed areas!"
Exit Sub
End If
 
strArea = Selection.Address (False, False)
strLinksOben = Left (strAbereich, InStr (strBereich, ":") - 1)
strRechtsUnten = Right (strBereich, Len (strBereich) - InStr (strBereich, ":"))
strZeileOben = Range (strLinksOben) .Row
strZeileUnten = Range (strRechtsUnten) .Row
MsgBox strLinksUp
MsgBox on the right below
MsgBox strLineUp
MsgBox strLineUbelow

End Sub


Hello
Case
_________________
Hello
Case
remper
Excel VBA SemiPro


Posted:
Jul 19, 2006, 1:28 pm
First name:

remper
Excel VBA SemiPro


Posted:
Jul 19, 2006, 1:35 pm
First name:

       

But how do I solve the following, resulting, problem:

Have two input fields s1 and s2 in a form. The two entries should result in a range in Excel. How do I add these two user input (string) together so that I can use both values ​​bundled in one variable with the command "Range (XXXX) .select" ??

Have tried the following, among others:

Code:
search area = s1 & ":" & s2
range (search range) .Select


I specified search area, s1, s2 as a string using DIM.
Karl_pb
Beginner


Posted:
Jul 19, 2006, 1:39 pm
First name:
Place of residence: at home

       

Yes:?:

There is the RefEdit control for entering areas.
_________________
Karl 8)

What time is love?
    UpAll times are
GMT + 1 hour
You can Post in this forum.
You can Reply to posts in this forum.
You can your posts in this forum Not to edit.
You can your posts in this forum Not Clear.
You can to polls in this forum Not participate.
You can Files in this forum Not Post
You can Download files in this forum

Related topics
Forum / Topics reply author Calls last contribution
Excel formulas: Determine a certain value9question58707 Dec 2007, 11:04 pm
question
Excel formulas: Compare two dates and determine days4Smurfette98619 Nov 2007, 12:26
Smurfette
Excel formulas: determine possible variants2JörgW110414 Nov 2007, 10:08 pm
JörgW
Excel formulas: Telephone no. & Fax no. compare, determine extension3otherlucy76577Sep 21, 2007, 7:09 am
< Peter >
Excel formulas: Find the second largest number2duidui243922 Aug 2007, 13:37
duidui
Excel formulas: reference to Excel folders, determine names dynamically4cs11555606 Aug 2007, 09:58
cs11
Excel formulas: Determine the last row and output it as a number8motley harlequin6518Jun 16, 2007, 6:48 pm
fridgenep
Excel formulas: Determine the number of specific days per month1wmv571495Apr 17, 2007, 9:06 am
McAdder
Excel formulas: Determine day of the week2sigi.hs691Jan 22, 2007, 5:55 pm
guest
Excel formulas: Determine missing values2schubertd99522 Jan 2007, 10:43
schubertd
Excel formulas: Calculate hours4guest1093Jun 25, 2006, 9:42 am
Azzuro
Excel formulas: Determine the content of cells Vol.22WhiteShark405589Apr 17, 2006, 1:38 pm
WhiteShark405