# Vertical line in chapter name

I added the vertical line after chapter number with following comma nds:

\usepackage{titlesec, blindtext, color}
\newsavebox\theCT
\definecolor{gray75}{gray}{0.75}
\newcommand{\hsp}{\hspace{20pt}}
\titleformat{\chapter}[hang]{\Huge\bfseries}{\thechapter\hsp}{0pt}{\Huge\bfseries\barbox}
\newcommand\barbox[1]{\savebox\theCT{%
\parbox[t]{\dimexpr\textwidth-55pt}{\strut#1\strut}}%
\textcolor{gray75}{\rule[-\dp\theCT]{1.1pt}{\dimexpr\ht\theCT+\dp\theCT}}%
\hsp{\usebox{\theCT}}}

How can I set a fixed length of vertical line after every chapter number?

• Welcome to TeX SX! Could you post a full compilable code? – Bernard Feb 7 at 13:49