2 posts / 0 new
Last post
save data error~?

Hi~ Nice to meet you~
I'm happy I find this program.
but to test this statplanet, I have opened StatPlanet_data_editor.xls at Create_Flash_Maps folder.
and, I have clicked 3.Save data button. and then I have encountered this message - Complie error.
this is     Cells.Replace What:="?, Replacement:=" - ", LookAt:=xlPart"   at Sub SaveData() function.
is this syntax right?? I guess that this source is wrong.
Could you give me the method to fix it.
I expect your reply.
thanks.
also I found the other suspcious error point.
 
Private Sub Save()
.
Cells.Replace What:="?, Replacement:=" '", LookAt:=xlPart 'replace apostrophe with one that is recognized by flash
.
 
Sub RunImportData()
 'UNAIDS:
        Cells.Replace What:="?, Replacement:="", LookAt:=xlWhole, SearchOrder _
        :=xlByRows, MatchCase:=False ', SearchFormat:=False, ReplaceFormat:=False

 

StatSilk's picture

Hi,
Such an error occurred due to the language edition and version of Excel you are using. This appears to be the case (the special characters were apparently replaced by '"?" in your version). Would you be able to indicate which language version of Excel you are using? Many thanks.
To resolve the issue you could remove those particular lines, as they are not crucial to running the macro.
Otherwise the way those lines of code should have been displayed is as follows:
 
Cells.Replace What:="’", Replacement:="'", LookAt:=xlPart 'replace apostrophe with one that is recognized by flash
 'UNAIDS:    
Cells.Replace What:="…", Replacement:="", LookAt:=xlWhole, SearchOrder _
        :=xlByRows, MatchCase:=False ', SearchFormat:=False, ReplaceFormat:=False
Best,
 
Frank
 

USER LOGIN