ZUMBIDO
10-22-2010, 11:48 AM
Hello. First at all I am Argentinian, and I speak and write in Spanish. My apologizes for Gramatical error in your language.
Ok. This is my situation. I am making a macro wich automatically do "TextToColumns" in an excel sheet. I know how to do it, but when I bring that commands from a "Module" to a "Form", start to appear a dialog to "Want to replace [..] the destine cell?" (buttons of Accept / Cancel), just after I give the command.
:help I really want to know if are a way to avoid that message and continue with the "textToColumns" commands. Or how I can make to tell this dialog to proceed with the replacement (I donīt have anything to the right)
This are the data I have about it:
=====================================================
Columns("C:C").Select
Selection.Insert Shift:=xlToRight
Selection.Insert Shift:=xlToRight
Selection.Insert Shift:=xlToRight
Range("B11:B22").Select
Selection.TextToColumns Destination:=Range("B11"), DataType:=xlDelimited, _
TextQualifier:=xlDoubleQuote, ConsecutiveDelimiter:=False, Tab:=False, _
Semicolon:=False, Comma:=False, Space:=False, Other:=True, OtherChar _
:="|", FieldInfo:=Array(Array(1, 1), Array(2, 1), Array(3, 1), Array(4, 1)), _
TrailingMinusNumbers:=True
Columns("E:E").Select
Selection.Delete Shift:=xlToLeft
Range("C10").Select
ActiveCell.FormulaR1C1 = "Label1" '<-- just some title to the columns
Range("D10").Select
ActiveCell.FormulaR1C1 = "Label2" '<-- just some title to the columns
=====================================================
The dialog supose to appear before " Selection.TextToColumns..." line.
Thank you so much for any help that you can give me.
Note: If need more info, let me know.
Note2: Here are 2 lines of the data that I have to "Encolumn":
38 | Medi_Nor | TECO|
35 | Medi_Sur | TECO|
Ok. This is my situation. I am making a macro wich automatically do "TextToColumns" in an excel sheet. I know how to do it, but when I bring that commands from a "Module" to a "Form", start to appear a dialog to "Want to replace [..] the destine cell?" (buttons of Accept / Cancel), just after I give the command.
:help I really want to know if are a way to avoid that message and continue with the "textToColumns" commands. Or how I can make to tell this dialog to proceed with the replacement (I donīt have anything to the right)
This are the data I have about it:
=====================================================
Columns("C:C").Select
Selection.Insert Shift:=xlToRight
Selection.Insert Shift:=xlToRight
Selection.Insert Shift:=xlToRight
Range("B11:B22").Select
Selection.TextToColumns Destination:=Range("B11"), DataType:=xlDelimited, _
TextQualifier:=xlDoubleQuote, ConsecutiveDelimiter:=False, Tab:=False, _
Semicolon:=False, Comma:=False, Space:=False, Other:=True, OtherChar _
:="|", FieldInfo:=Array(Array(1, 1), Array(2, 1), Array(3, 1), Array(4, 1)), _
TrailingMinusNumbers:=True
Columns("E:E").Select
Selection.Delete Shift:=xlToLeft
Range("C10").Select
ActiveCell.FormulaR1C1 = "Label1" '<-- just some title to the columns
Range("D10").Select
ActiveCell.FormulaR1C1 = "Label2" '<-- just some title to the columns
=====================================================
The dialog supose to appear before " Selection.TextToColumns..." line.
Thank you so much for any help that you can give me.
Note: If need more info, let me know.
Note2: Here are 2 lines of the data that I have to "Encolumn":
38 | Medi_Nor | TECO|
35 | Medi_Sur | TECO|