View Single Post
  #2   Report Post  
Posted to microsoft.public.excel.programming
Mike H Mike H is offline
external usenet poster
 
Posts: 11,501
Default vba for find last column with hidden columns in worksheet

Hi,

lc = Rows(7).Find(What:="*", SearchDirection:=xlPrevious).Column

Mike

"OffDev" wrote:

Hello,

This code has worked for finding the last column:
lc = ws.cells(7, columns.count).end(xltoleft).column.

However, when I used this code for a sheet that has hidden columns it would
not work.

What would be the correct code in this instance?

Please assist.

Thanks from OffDev wannabe