Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations SkipVought on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Column header & Sheet title

Status
Not open for further replies.

prija

Programmer
Oct 17, 2002
28
0
0
YU
Hi,
I make a form with few text field. I want when user select one cell in sheet to transfer in text field a column header(A,B,C,....,AA,AB,...).I can transfer column number!
Second, my user rename sheet name (sheet1 to FirstSheet) and
he want to display that name in one cell. All that he want to do when create new sheet from active sheet and rename that new sheet.
Is it posible?
 
Hi,
Code:
ColString = Chr(ActiveCell.Column + 64)
To find the sheet name
Code:
=RIGHT(CELL("filename",A1),LEN(CELL("filename",A1))-FIND("]",CELL("filename",A1)))
:)



Skip,
Skip@TheOfficeExperts.com
 
If you need to go beyond column Z, the following will work:

function CurrentColumn(r as range) as string
dim s as string
s=r.EntireColumn.Address(0,0)
CurrentColumn=left(s,instr(s,":")-1)
end function


Rob
[flowerface]
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top