function readOnly(count){ }
Starting November 20, the site will be set to read-only. On December 4, 2023,
forum discussions will move to the Trailblazer Community.
+ Start a Discussion
BKBK 

how do i modify this macro vb code?

hey guys, this
particular macro does a find and replace but how do i do it so it runs the macro until it reaches the last record of the column? Right now it only does sepcified records in the column but the dataset changes everysay so i need to run it until it reaches eod of last record.
Range("E8:E16").Select
Selection.Replace What:= null, Replacement:="none" LookAt:=xlPart, _
SearchOrder:=xlByRows, MatchCase:=False, SearchFormat:=False, _
ReplaceFormat:=False
BKBK

also,

how do i create a macro to save the current worksheet minus all the toolkit?

ScotScot

BK,

To select the entire column in a table, you can use the currentregion property. An example is:

range("E8").select
selection.currentregion.columns(1).select

range("E8").select ... selects your first cell
selection.currentregion ... returns a range object expanded to the entire table
columns(1) ... returns a range object with only the first column of the region.

If you have additional rows above 8 in the table (e.g. column headings), you'll need to further qualify the final selection using "rows" or "cells" where I used columns above.


Overall, I'd suggest you get a good Excel VBA book to help with these types of questions... I've got one back in the office that I'll recommend next week when I'm back there. 
Scot
bouscalbouscal

I've found that Experts Exchange is an excellent source for sharing Excel coding advice, in the Apps section they have an area specific to Excel.  A free account gives you enough points to ask a few questions and if you've got the time to help others with their questions you have the ability to earn a premium account with unlimited questioning ability.

Tim Bouscal

Message Edited by bouscal on 02-02-2005 03:14 PM