|
code
newsgroups
|
|||||||||||||||||||||||
|
|||||||||||||||||||||||
excel and cols/rows from vbI have a macro installed in excel that parses the contents of a worksheet. The problem is that the current loop iterates over all cells of the worksheet regardless of whether they are empty or not. i.e. last_col = ActiveCell.Column last_line = ActiveCell.Row this doesn' t take into consideration the fact that even though there are 100 X 100 cells in the sheet, only 40 X 40 of them (say) are valid. Anybody know what I can do to determine what method/function to use? thanks much G Graham,
ActiveSheet.UsedRange Although not always 100% reliable depending on the situation. NickHK <GrahamJWa***@gmail.com> wrote in message Show quoteHide quote news:1127477347.875310.269150@o13g2000cwo.googlegroups.com... > Hi, > > I have a macro installed in excel that parses the contents of a > worksheet. The problem is that the current loop iterates over all cells > of the worksheet regardless of whether they are empty or not. > > i.e. > > last_col = ActiveCell.Column > last_line = ActiveCell.Row > > this doesn' t take into consideration the fact that even though there > are 100 X 100 cells in the sheet, only 40 X 40 of them (say) are valid. > Anybody know what I can do to determine what method/function to use? > > > thanks much > > G > Graham-
I've found this page usefull in the past. http://www.mvps.org/dmcritchie/excel/lastcell.htm HTH Matt <GrahamJWa***@gmail.com> wrote in message Show quoteHide quote news:1127477347.875310.269150@o13g2000cwo.googlegroups.com... > Hi, > > I have a macro installed in excel that parses the contents of a > worksheet. The problem is that the current loop iterates over all cells > of the worksheet regardless of whether they are empty or not. > > i.e. > > last_col = ActiveCell.Column > last_line = ActiveCell.Row > > this doesn' t take into consideration the fact that even though there > are 100 X 100 cells in the sheet, only 40 X 40 of them (say) are valid. > Anybody know what I can do to determine what method/function to use? > > > thanks much > > G > <GrahamJWa***@gmail.com> wrote in message
news:1127477347.875310.269150@o13g2000cwo.googlegroups.com... You used the word "macro." This suggests that you are using VBA from an > I have a macro installed in excel Office product. This group is for writing programs in full-blown VB. I recommend asking your question in the group dedicated to VBA for your particular product. Examples: microsoft.public.excel.programming microsoft.public.word.vba.general (or a more specific group in this hierarchy) microsoft.public.access.modulesdaovba microsoft.public.outlook.program_vba
sendkeys doesnt sometimes send keys
Visual Studio 6.0 Product ID Number locking of DB Responding to horizontal scroll messages from MS mice HELP! Menu commands - Cut, Copy, Paste, & Find Winsock API callback events Autosizing ListView columns Properties Dialog box GONE MISSING How to comment a block codes about mutiple databases |
|||||||||||||||||||||||