Comma decimal separator turns into dot after Copy code?

Excel Facts

Formula for Yesterday
Name Manager, New Name. Yesterday =TODAY()-1. OK. Then, use =YESTERDAY in any cell. Tomorrow could be =TODAY()+1.
I figured out. Problem is in second Workbook print code. After i print report, then i get comma error.
But, question is how to fix it??

Code:
Sub pRINT_FUEL_REPORT() 
     '
     ' PRINT_FUEL_REPORT Macro
     '
    On Error Goto ifERROR 
     'This is in case if selected out of print range but clicking print in cell("V1")
    If ActiveCell.Column() > 21 Or ActiveCell.Row() > 61 Or ActiveCell.Row() = 1 _ 
    Or ActiveCell.Value = "" Then 
        MsgBox "   W R O N G  R A N G E !" & vbNewLine & " " & vbNewLine & _ 
        "   OR THERE IS NO PRINTABLE DATA !", 64, "" 
        Goto ifERROR 
    Else 
        Dim MSG As String, ANS As Variant 
        MSG = " DO YOU WANT PRINT REPORT?" & "  " & _ 
        Range("A" & ActiveCell.Row) & "  " & Range("C" & ActiveCell.Row) 
        ANS = MsgBox(MSG, vbQuestion + vbYesNo + vbDefaultButton2, "Print report") 
        Select Case ANS 
        Case vbYes 
            Application.ScreenUpdating = False 
             
            Range("A" & ActiveCell.Row).Select 
            Selection.Copy 
            Sheets("Sheet2").Select 
            Range("C4").Select 
            Selection.PasteSpecial Paste:=xlPasteValues, Operation:=xlNone, SkipBlanks _ 
            :=False, Transpose:=False 
            Sheets("Sheet1").Select 
            Range("B" & ActiveCell.Row).Select 
            Application.CutCopyMode = False 
            Selection.Copy 
            Sheets("Sheet2").Select 
            Range("C6").Select 
            Selection.PasteSpecial Paste:=xlPasteValues, Operation:=xlNone, SkipBlanks _ 
            :=False, Transpose:=False 
            Sheets("Sheet1").Select 
            Range("C" & ActiveCell.Row).Select 
            Application.CutCopyMode = False 
            Selection.Copy 
            Sheets("Sheet2").Select 
            Range("C7").Select 
            Selection.PasteSpecial Paste:=xlPasteValues, Operation:=xlNone, SkipBlanks _ 
            :=False, Transpose:=False 
            Sheets("Sheet1").Select 
            Range("E" & ActiveCell.Row).Select 
            Application.CutCopyMode = False 
            Selection.Copy 
            Sheets("Sheet2").Select 
            Range("C9").Select 
            Selection.PasteSpecial Paste:=xlPasteValues, Operation:=xlNone, SkipBlanks _ 
            :=False, Transpose:=False 
            Sheets("Sheet1").Select 
            Range("D" & ActiveCell.Row).Select 
            Application.CutCopyMode = False 
            Selection.Copy 
            Sheets("Sheet2").Select 
            Range("K9").Select 
            Selection.PasteSpecial Paste:=xlPasteValues, Operation:=xlNone, SkipBlanks _ 
            :=False, Transpose:=False 
            Sheets("Sheet1").Select 
            Range("F" & ActiveCell.Row).Select 
            Application.CutCopyMode = False 
            Selection.Copy 
            Sheets("Sheet2").Select 
            Range("F16").Select 
            Selection.PasteSpecial Paste:=xlPasteValues, Operation:=xlNone, SkipBlanks _ 
            :=False, Transpose:=False 
            Sheets("Sheet1").Select 
            Range("G" & ActiveCell.Row).Select 
            Application.CutCopyMode = False 
            Selection.Copy 
            Sheets("Sheet2").Select 
            Range("H14").Select 
            Selection.PasteSpecial Paste:=xlPasteValues, Operation:=xlNone, SkipBlanks _ 
            :=False, Transpose:=False 
            Sheets("Sheet1").Select 
            Range("H" & ActiveCell.Row & ":K" & ActiveCell.Row).Select 
            Application.CutCopyMode = False 
            Selection.Copy 
            Sheets("Sheet2").Select 
            Range("G12").Select 
            Selection.PasteSpecial Paste:=xlPasteValues, Operation:=xlNone, SkipBlanks _ 
            :=False, Transpose:=False 
            Sheets("Sheet1").Select 
            Range("L" & ActiveCell.Row).Select 
            Application.CutCopyMode = False 
            Selection.Copy 
            Sheets("Sheet2").Select 
            Range("F18").Select 
            Selection.PasteSpecial Paste:=xlPasteValues, Operation:=xlNone, SkipBlanks _ 
            :=False, Transpose:=False 
            Sheets("Sheet1").Select 
            Range("M" & ActiveCell.Row).Select 
            Application.CutCopyMode = False 
            Selection.Copy 
            Sheets("Sheet2").Select 
            Range("F19").Select 
            Selection.PasteSpecial Paste:=xlPasteValues, Operation:=xlNone, SkipBlanks _ 
            :=False, Transpose:=False 
            Sheets("Sheet1").Select 
            Range("N" & ActiveCell.Row & ":Q" & ActiveCell.Row).Select 
            Application.CutCopyMode = False 
            Selection.Copy 
            Sheets("Sheet2").Select 
            Range("G13").Select 
            Selection.PasteSpecial Paste:=xlPasteValues, Operation:=xlNone, SkipBlanks _ 
            :=False, Transpose:=False 
            Sheets("Sheet1").Select 
            Range("R" & ActiveCell.Row).Select 
            Application.CutCopyMode = False 
            Selection.Copy 
            Sheets("Sheet2").Select 
            Range("F17").Select 
            Selection.PasteSpecial Paste:=xlPasteValues, Operation:=xlNone, SkipBlanks _ 
            :=False, Transpose:=False 
            Sheets("Sheet1").Select 
            Range("S" & ActiveCell.Row).Select 
            Application.CutCopyMode = False 
            Selection.Copy 
            Sheets("Sheet2").Select 
            Range("F21").Select 
            Selection.PasteSpecial Paste:=xlPasteValues, Operation:=xlNone, SkipBlanks _ 
            :=False, Transpose:=False 
            Sheets("Sheet1").Select 
            Range("T" & ActiveCell.Row).Select 
            Application.CutCopyMode = False 
            Selection.Copy 
            Sheets("Sheet2").Select 
            Range("F22").Select 
            Selection.PasteSpecial Paste:=xlPasteValues, Operation:=xlNone, SkipBlanks _ 
            :=False, Transpose:=False 
            Sheets("Sheet1").Select 
            Range("U" & ActiveCell.Row).Select 
            Application.CutCopyMode = False 
            Selection.Copy 
            Sheets("Sheet2").Select 
            Range("H16:J19").Select 
            ActiveSheet.Paste 
            ActiveWindow.SmallScroll DOWN:=-30 
            Range("A1:L30").Select 
            Application.CutCopyMode = False 
             
            Application.ScreenUpdating = True 
             '        In case there is no printing device:
            On Error Resume Next 
            Application.Dialogs(xlDialogPrinterSetup).Show 
            Selection.PrintOut Preview:=True 
            On Error Goto 0 
             
            Application.ScreenUpdating = False 
            Range("H16:J19").Select 
            Selection.ClearContents 
            Range("F22").Select 
            Selection.ClearContents 
            Range("F21").Select 
            Selection.ClearContents 
            Range("F19").Select 
            Selection.ClearContents 
            Range("F18").Select 
            Selection.ClearContents 
            Range("F16:F17").Select 
            Range("F17").Activate 
            Selection.ClearContents 
            ActiveWindow.SmallScroll DOWN:=-18 
            Range("G12:J14").Select 
            Selection.ClearContents 
            Range("K9").Select 
            Selection.ClearContents 
            Range("C9").Select 
            Selection.ClearContents 
            Range("C7").Select 
            Selection.ClearContents 
            Range("C6").Select 
            Selection.ClearContents 
            Range("C4").Select 
            Selection.ClearContents 
            Sheets("Sheet1").Select 
            ActiveWindow.SmallScroll ToLeft:=12 
            Range("A1").Select 
             
            Application.ScreenUpdating = True 
             
        Case vbNo 
Goto QUIT: 
        End Select 
ifERROR: 
    End If 
    Exit Sub 
QUIT: 
End Sub

And this code uncheck my FILE>OPTIONS>ADVANCE setting http://i66.tinypic.com/23wwt9v.jpg
 
Last edited:
Upvote 0
Please, MrExcel, may I upload workbook.xlsm ? Please.
 
Upvote 0
Please, MrExcel, may I upload workbook.xlsm ? Please.
It is so weird problem. After I print report, I just lose european keyboard layout, numerical side of keyboard, comma goes into dot. But only inside Excel, not Outlook, not inside Windows :(
 
Last edited:
Upvote 0
It is so weird problem. After I print report, I just lose european keyboard layout, numerical side of keyboard, comma goes into dot. But only inside Excel, not Outlook, not inside Windows :(
And only after printing on paper. When I choose to cancel print in PrintPreview there is no error.
 
Upvote 0
I figured out after three months. Problem is in PrintPreview, but WHYYY MICROSOFT, WHY!


Code:
'        In case there is no printing device:
         On Error Resume Next
         Application.Dialogs(xlDialogPrinterSetup).Show
         Selection.PrintOut Preview:=True

When i set Selection.PrintOut Preview:=False everything is fine, no error.
But, why! I really need print preview :( ;(
 
Last edited:
Upvote 0
I figured out after three months. Problem is in PrintPreview, but WHYYY MICROSOFT, WHY!


Code:
'        In case there is no printing device:
         On Error Resume Next
         Application.Dialogs(xlDialogPrinterSetup).Show
         Selection.PrintOut Preview:=True

When i set Selection.PrintOut Preview:=False everything is fine, no error.
But, why! I really need print preview :( ;(

Sorry, bump.
 
Upvote 0

Forum statistics

Threads
1,215,387
Messages
6,124,633
Members
449,177
Latest member
Sousanna Aristiadou

We've detected that you are using an adblocker.

We have a great community of people providing Excel help here, but the hosting costs are enormous. You can help keep this site running by allowing ads on MrExcel.com.
Allow Ads at MrExcel

Which adblocker are you using?

Disable AdBlock

Follow these easy steps to disable AdBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the icon in the browser’s toolbar.
2)Click on the "Pause on this site" option.
Go back

Disable AdBlock Plus

Follow these easy steps to disable AdBlock Plus

1)Click on the icon in the browser’s toolbar.
2)Click on the toggle to disable it for "mrexcel.com".
Go back

Disable uBlock Origin

Follow these easy steps to disable uBlock Origin

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back

Disable uBlock

Follow these easy steps to disable uBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back
Back
Top