Search : in
By :

Find a variable in a selection

Last answer on Mar 12, 2009 9:16:40 am GMT Squando, on Mar 11, 2009 10:49:52 am GMT 
 Report this message to moderators

Hello,

This is probably maddeningly simple or completely the wrong way to do things. I have data added each day and I was wanting to add a button that basically jumps to todays date and then copies data to the attached row. Copying is fine but so far however I can't even select the date.
Column A has the dates which can change, but will always contain today. C3=Today() . I have tried to set aVab, but I am a complete novice and can't find the answer to this simple query. I seem to always get error 91 object variable not set thingy.

    Dim aVab As Date
    aVab = Range("C3").Value
        
    Columns("A:A").Select
    Selection.Find(What:=aVab, After:=ActiveCell, LookIn:=xlValues, LookAt _
    :=xlPart, SearchOrder:=xlByRows, SearchDirection:=xlNext, MatchCase:= _
    False, MatchFormat:=False).Activate
    ActiveCell.Select


Please help. I have been trawling through the VB help and these forums.
Everyone seems very helpful and I have found many helpful pointers but not the answer to this.

Thank you very much

Squando
Configuration: Windows 2000
Internet Explorer 6.0

Best answers for « Find a variable in a selection » in :
How do I find Word's keyboard shortcuts? ShowHow do I find Word's keyboard shortcuts? To deal with shotcuts you have several possibilities. 1- Some keyboard shortcuts are listed next to the items in the main menu (just open menu list and check out). 2- You can also find...
The pictures taken from Skype can't be found ShowThe pictures taken from Skype can't be found Issue Solution Where are stored the pictures taken with Skype? Issue If you take a picture of one of your contacts during a video conversation on Skype and you can't find them....
ITunes cannot find my iTunes folder ShowiTunes cannot find my iTunes folder Issue Solution Note Issue I just bought the iPOD TOUCH. I have iTunes 8X, but it won't open saying;
Download Auslogics Duplicate File Finder ShowAuslogics Duplicate File Finder is a utility to look for and delete duplicate files on your computer. Any daily computer activity accumulates automatically duplicate files on your PC, especially if you are an active user. Auslogics Duplicate File...
Download FinderCleaner ShowFinderCleaner is a utility for deleting hidden files which are specific to Mac. It erases the .DS_Store, ._Resource forks, .Trashes, .FBC. That is ideal before sending a file on a network Watch out, after selecting the folder to be cleaned, it...
Environment variables ShowEnvironment variables An environment variable is a dynamic value loaded into the memory that can be used by several processes operating simultaneously. On most operating systems, the location of some libraries or of the main system executables may...
Spreadsheets - Cell Selection ShowCell Selection Spreadsheets are powerful tools for working with data. However, to work with data, it is necessary to have tools to rapidly choose the required cells. Line Selection An entire line can be chosen by clicking directly on the line...
EFQM - European Foundation for Quality Management ShowIntroduction to EFQM The EFQM (European Foundation for Quality Management) is a European foundation based in Brussels that was founded in 1988 by 14 European companies (Bosch, BT, Bull, Ciba-Geigy, Dassault, Electrolux, Fiat, KLM, Nestlé, Olivetti,...

1

Wut Up WutUp, on Mar 11, 2009 10:52:43 pm GMT
  • +1

If the date [Today())] will appear in the column one time and you want to select that cell, this will do the trick.
Hope this helps!

Dim aVab
Dim c As Range
aVab = Range("C3").Value


For Each c In Range("A1:A65536")

If c = aVab Then
c.Select

End If

Next c

Reply to Wut Up WutUp

2

 Squando, on Mar 12, 2009 9:16:40 am GMT

Cheers Wutup.

As I suspected you have made it all so simple.
Thanks a lot.

Squando ;)

Reply to Squando