VBA Code Pastespecial error

%3CLINGO-SUB%20id%3D%22lingo-sub-1982012%22%20slang%3D%22en-US%22%3EVBA%20Code%20Pastespecial%20error%3C%2FLINGO-SUB%3E%3CLINGO-BODY%20id%3D%22lingo-body-1982012%22%20slang%3D%22en-US%22%3E%3CP%3EI%20have%20to%20copy%20a%20table%20in%20html%20format%20to%20paste%20in%20Gmail%20body.%20Sometimes%20I%20get%20the%20error%20%22Pastespecial%20error%20or%20Rangeclass%20failed%22.%20I%20am%20not%20able%20to%20figure%20it%20when%20and%20why%20this%20is%20happening%20as%20it%20doesn't%20give%20this%20error%20always.%20The%20code%20run%20again%20in%20the%20evening%20and%20sometime%20gives%20Pastespecial%20error%20in%20the%20morning.%26nbsp%3B%20I%20have%20attached%20my%20code.%3C%2FP%3E%3CP%3E%26nbsp%3B%3C%2FP%3E%3CP%3E%26nbsp%3B%3C%2FP%3E%3C%2FLINGO-BODY%3E%3CLINGO-LABS%20id%3D%22lingo-labs-1982012%22%20slang%3D%22en-US%22%3E%3CLINGO-LABEL%3EExcel%3C%2FLINGO-LABEL%3E%3CLINGO-LABEL%3EExcel%20for%20web%3C%2FLINGO-LABEL%3E%3CLINGO-LABEL%3EMacros%20and%20VBA%3C%2FLINGO-LABEL%3E%3C%2FLINGO-LABS%3E
Occasional Visitor

I have to copy a table in html format to paste in Gmail body. Sometimes I get the error "Pastespecial error or Rangeclass failed". I am not able to figure it when and why this is happening as it doesn't give this error always. The code run again in the evening and sometime gives Pastespecial error in the morning.  I have attached my code.

 

 

0 Replies