How do I get a range's address including the worksheet name, but not the workbook name, in Excel VBA?

前端 未结 11 1417
眼角桃花
眼角桃花 2020-12-25 10:34

If I have a Range object--for example, let\'s say it refers to cell A1 on a worksheet called Book1. So I know that calling Address()

11条回答
  •  生来不讨喜
    2020-12-25 10:55

    Why not just return the worksheet name with address = cell.Worksheet.Name then you can concatenate the address back on like this address = cell.Worksheet.Name & "!" & cell.Address

提交回复
热议问题