In the Tools menu, there is a very useful function - Decompile from VA (decompile any code from the provided virtual address). The main feature of this function is that it does not require the file being decompiled to have a correct structure and be processed using standard way. Of course, in this case, the code will be decompiled with a number of limitations. For example, if imported functions or OLE objects were not pre-processed, the code will be uninformative at those points.
To decompile a specific piece of code within a file, you simply need to specify the virtual address of that code (if we're talking about Native Code or .NET assembly), or provide a ProcInfo structure reference (if we're talking about classic Visual Basic P-Code). The uniqueness of working with such P-Code is that the ProcInfo structure contains an array of data used by the code. Without this array, it is impossible to determine which functions the code works with, what strings it refers to, and so on. In the case of working with .NET assemblies, after entering the address, the decompiler will offer you a choice between decompiling the code as MS IL pseudo-code or disassembling this code. This option is due to the fact that .NET assemblies can contain both MS IL pseudo-code (managed code) and machine code (so-called unmanaged code).
If the file is already open in the decompiler, you just need to call the Decompile from VA function and specify the address for processing. If the file has not yet been opened, this will be suggested automatically, and the file will be opened in simplified mode.
The Decompile from VA function is particularly useful when the desired code does not decompile automatically or if the file is partially damaged, preventing it from being decompressed using standard tools. Of course, you should understand that the result of the decompilation in this case will be worse than with a standard decompilation.