Results 1 to 3 of 3

Thread: VB or VBA

  1. #1

    Thread Starter
    Hyperactive Member badgers's Avatar
    Join Date
    Sep 1999
    Location
    Madison, WI USA
    Posts
    444

    Post

    I want to write a program for excel.
    How would I ask the user to highlight(select) cells during program execution.
    If it is easier in VBA then I will use that. This is a simple program.
    Any idea on how to get the user to select a group of cells?
    how do I get VB/VBA to loop through all the cells.(ie i don't know how to setup or increment a counter for the columns(alphabetic designations, AA AB AC and so on)
    thank you for your time and have a good day

    ------------------
    I am so skeptacle, I can hardly believe it!

  2. #2
    Guest

    Post

    You have to use the numerical offsetr to access the columns.

    a = 1
    b = 2
    c = 3

    Code:
    Dim Db As Worksheet
    Dim Temp As String
    Temp = Trim(UCase(Db.Cells(1, 4).Value))
    This will give you row 1 column D.

    ------------------
    Boothman
    There is a war out there, and it is about who controls the information, it's all about the information.



    [This message has been edited by Boothman_7 (edited 02-03-2000).]

  3. #3

    Thread Starter
    Hyperactive Member badgers's Avatar
    Join Date
    Sep 1999
    Location
    Madison, WI USA
    Posts
    444

    Post

    thanks that seems rather straight forward.
    Can I ask how to prompt the user to drag the mouse and highlight some cells?
    I would like to ask the user to highlight a range of cells just before the end of the program. The amount of rows and columns is not known before the program executes. My program will tell the user how many rows and columns to select at the end. Is there a way to say in VB:
    Hey, Go select 4 rows and 3 columns and then hit return.
    thank you for your time and have a good day

    ------------------
    I am so skeptacle, I can hardly believe it!

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  



Click Here to Expand Forum to Full Width