Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 2
Default VBA set range according to find

To the Excel guru's out there,

I have a few questions about vba and finding information. Here is the
requirements:
I have three check boxes, checkbox1, checkbox2 and checkbox3. Checkbox1
refers to employee name, checkbox2 refers to destination and checkbox3
refers to locatation.
I have a vba code that automatically types out the information which
the receptionist must ask, example:
dim a as range
dim b as range
dim c as range
set a = sheet1.range("A10")
set b = sheet1.range("A11")
set c = sheet1.range("A12")
a.value = Employee First Name:
b.value = Employee Surname:
c.value = Employee Address:
Now the above is the same for checkbox2 and checkbox3 except located at
different range values. I have been requested to add a inputbox which
will prompt the receptionist to enter how many employees (this has been
done). It will then copy the selected range and paste the selection
directly after c.value - the other checkboxes will also have prompts
linked to them and so more information could be added.

The problem is that the checkbox2 and checkbox3 values will now replace
the copied ranges with their values. The other problem is that the
receptionist might only use checkbox1 and checkbox3, not checkbox2. I
have been requested that the information on checkbox1 be kept together
as well as the information for checkbox3.

I have tried using the cell.find option to get the first string of text
from checkbox2 but seem to get errors if the value cannot be found.
After the address is located, I need to set range a.value to the line
above checkbox2 but only if it is found. Obveoulsy the line above
checkbox3 if there is not checkbox2 selected, etc.

This comes accross extremely confusing and so I hope someone can
understand the method behind this madness.

Thanks in advance.
Chris

Reply
Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Posting Rules

Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On


Similar Threads
Thread Thread Starter Forum Replies Last Post
Find Last cell in Range when range is date format default105 Excel Discussion (Misc queries) 5 July 7th 09 03:11 PM
Find a range of values in a range of cells Jack Taylor Excel Worksheet Functions 20 November 25th 06 01:26 PM
Find the POSITION IN A RANGE of text in a string that matches value(s) in a range Cornell1992 Excel Programming 0 March 14th 06 07:19 PM
Find dates in a range; then sum values in that range by a criteria Anders Excel Discussion (Misc queries) 4 October 21st 05 03:41 PM
Find first cell in range and expand range -VBA Caméléon Excel Programming 3 December 4th 04 02:01 AM


All times are GMT +1. The time now is 07:59 PM.

Powered by vBulletin® Copyright ©2000 - 2024, Jelsoft Enterprises Ltd.
Copyright ©2004-2024 ExcelBanter.
The comments are property of their posters.
 

About Us

"It's about Microsoft Excel"