![]() |
How to delete the content of Excel cells from VBS script?
I would like to delete the current content/value of the cells
3,6 .... 3,18 How can I do this within a *.vbs script? Claudia |
How to delete the content of Excel cells from VBS script?
Hi,
What does '3,6 .... 3,18' mean? Are you say you want to delete all values in the range 3.6 to 3.18? Mike "Claudia d'Amato" wrote: I would like to delete the current content/value of the cells 3,6 .... 3,18 How can I do this within a *.vbs script? Claudia |
How to delete the content of Excel cells from VBS script?
"Claudia d'Amato" wrote in message ... I would like to delete the current content/value of the cells 3,6 .... 3,18 How can I do this within a *.vbs script? Claudia create a Macro in Excel. this is a very basic example that sticks "hello in rows 2 to 20 of column A. For i = 2 To 20 Range("A" & i).Value = "hello" Next Now if I wanted to blank this range, I'd just change the line to this. Range("A" & i).Value = "" Changing all the values to blank. Just play about with it until you get what you want. Dave |
How to delete the content of Excel cells from VBS script?
Does this mean Row 3, column 6 to Row 3, column 18?
And you really mean a VBS script? If yes to both, then this worked ok for me: ================ Dim xlApp Dim xlWks Set xlApp = CreateObject("Excel.application") 'xlApp.Visible = True Set xlWks = xlApp.Workbooks.Open("C:\book1.xls").Worksheets(1) xlWks.Range("F3").Resize(1, 13).ClearContents xlWks.Parent.Close True xlApp.Quit Set xlWks = Nothing Set xlApp = Nothing ================= It's nice to see what's happening when you're debugging. That's why I kept the ..visible line in the pasted code. Claudia d'Amato wrote: I would like to delete the current content/value of the cells 3,6 .... 3,18 How can I do this within a *.vbs script? Claudia -- Dave Peterson |
How to delete the content of Excel cells from VBS script?
i guess she means X,Y so third column , sixth cell and cell eighteen
"Mike H" schreef in bericht ... Hi, What does '3,6 .... 3,18' mean? Are you say you want to delete all values in the range 3.6 to 3.18? Mike "Claudia d'Amato" wrote: I would like to delete the current content/value of the cells 3,6 .... 3,18 How can I do this within a *.vbs script? Claudia |
How to delete the content of Excel cells from VBS script?
try
range(cells(3,6),cells(3,18)).clearcontents -- Don Guillett Microsoft MVP Excel SalesAid Software "Claudia d'Amato" wrote in message ... I would like to delete the current content/value of the cells 3,6 .... 3,18 How can I do this within a *.vbs script? Claudia |
All times are GMT +1. The time now is 12:12 PM. |
Powered by vBulletin® Copyright ©2000 - 2025, Jelsoft Enterprises Ltd.
ExcelBanter.com