It will. There must be some reason why it is not possible in your position.
Edit: if that is about your ongoing online chess game, where Black just played h6-h5 -- you can only capture en passant right after the opponent moves a pawn two squares. He moved it one square only.
(assuming that clarifying the rules of chess doesn't isn't giving advice on an ongoing game...)
Why wont the computer let me "capture en passant"?