Some Handy Codes

Hyperlinks:
Activesheet.hyperlinks.add Anchor:=Activecell, address:=File.path, TextToDisplay:="My text(File.name)"
++++++++++++++++++++++++++++++++++
Cells.Find() method:
Cells.Find("Text").select
+++++++++++++++++++++++++++
Selecting Active Range Dynamically:

method:1
Range(cells(x,y),cells(Rows.count,y).end(Xlup)).select

Method:2
Range(ActiveCell, ActiveCell.End(xlDown)).select

Method: 3
Worksheets("Sheet1").Activate ActiveSheet.Cells.SpecialCells(xlCellTypeLastCell).Activate
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
DAY-MONTH-YEAR-TIME format:

Format(NOW(), "yyyy-dd-mm -hh-mm-ss AM/PM")

+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++

Freeze Pane:
Range("???").Select ActiveWindow.FreezePanes = True
++++++++++++++++++++++++++++++++++++++++++++++

GridView On/Off:

grid view off: ActiveWindow.DisplayGridlines = False
grid view on: ActiveWindow.DisplayGridlines = true

+++++++++++++++++++++++++++++++++++++++++++++++++

Application.Wait (Now() + TimeValue("00:00:01"))
***************************************************************************

Activesheet.Replace(WhatReplacementLookAtSearchOrderMatchCaseMatchByteSearchFormat,ReplaceFormat)





No comments:

Post a Comment