Home |
Search |
Today's Posts |
#1
Posted to microsoft.public.excel.programming
|
|||
|
|||
Finding and Amending a record
Hello,
I am having trouble with what appears to be a simple task! I have a few forms which I am creating (have previously been here for help on other aspects of creating these!). Basically, I have set up a 'menu' form which can take you to one of three forms, the first form is working great, this one inputs to the spreadsheet with the data which you input (then press a 'submit' button). the next form is to go on to the next stage of the record which is adding more data after 6 months (only two cells). The third form isnt even nearly done as it is roughly the same as the second form and once i have done that the last should be a breeze. The trouble i am having is I have got to the stage where i need to look up from a unique number to find the right line and then add the two bits of information to that line, (and then go on to finding the next record etc etc until you are done adding). I have tried to achieve this with various snippets of code which others have kindfully added as solutions to other similar problems but I cannot get anything to do what i want. Perhaps i am trying to go to far too quick as although i can learn things as i go along, before 3 weeks ago i had never touched VB in my life. I have only just learned the offset command and the xldown and other small bits! Perhaps someone could help me with the concept and perhaps explain what the command does? (I am pasting a line of code which i have tried to get to work to no avail) Selection.Find(What:=Interiminput.regint.Text, After:=ActiveCell, LookIn:=xlValues, LookAt:=xlPart, SearchOrder:=xlBycells, SearchDirection:=xlNext, MatchCase:=False).Activate Many thanks in anticipation. Duncan |
#2
Posted to microsoft.public.excel.programming
|
|||
|
|||
Finding and Amending a record
(just to add, I tried the vb help and the code it gave as the find done
nothing except fill in the cells with a "5". not very helpful!) |
#3
Posted to microsoft.public.excel.programming
|
|||
|
|||
Finding and Amending a record
Ok,
I have managed to get that code to work, It was looking xlbycells and not xlbyrows, also removed the after as i didnt think i needed it. now i need to select what i have found so that i can go on to offset and add info to that row and so on. Is it possible to select it as i havent really selected that cell so far, it is only finding it within a selection. have i got that right or am i being stupid? |
#4
Posted to microsoft.public.excel.programming
|
|||
|
|||
Finding and Amending a record
Please ignore this topic, I have experimented a bit and found the
answer was pretty simple. (it was already selecting the cell when it found it all i needed to do was start offsetting and putting the data in) |
Reply |
Thread Tools | Search this Thread |
Display Modes | |
|
|
Similar Threads | ||||
Thread | Forum | |||
Finding the next record in a column | Excel Discussion (Misc queries) | |||
Finding Duplicate Record in more than one column | Excel Discussion (Misc queries) | |||
Finding a record based on user input | Excel Discussion (Misc queries) | |||
Finding last record in month for each of several types of record. | Excel Programming | |||
Finding a record using multiple combo boxes as my search criteria | Excel Discussion (Misc queries) |