473,386 Members | 1,715 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,386 software developers and data experts.

Why can I delete text through VB but not if it is a number?

Apparently I must change the number in a cell to value before i can delete it

Expand|Select|Wrap|Line Numbers
  1. 'Range is set from row 3 to end (Assumes row 1& 2 is column headers)
  2. With ActiveSheet
  3. Set rngColI = .Range(.Cells(3, "I"), _
  4. .Cells(.Rows.count, "I").End(xlUp))
  5. End With
  6.  
  7. With rngColI
  8. 'Must work backwards from bottom when deleting rows.
  9. For i = .Rows.count To 1 Step -1
  10.  
  11. 'Convert all cell to value to correspond with cboRegStock.Value
  12.  
  13. varDeleteVal = Value
  14.  
  15. If .Cells(i, 1) = varDeleteVal Then
  16.  
  17. .Cells(i, 0).ClearContents
  18. .Cells(i, 1).ClearContents
  19. .Cells(i, 2).ClearContents
  20. .Cells(i, 3).ClearContents
  21.  
Nov 13 '10 #1
1 1005
smartchap
236 100+
Dear Hennie
Please make the problem clear. The code posted is part of some code and not clear about the problem being faced. What is the variable VALUE and what's its value?
Dec 7 '10 #2

Sign in to post your reply or Sign up for a free account.

Similar topics

3
by: Jennie Friesen | last post by:
Hello-- I would like to display a different line of text (32 different messages) on refresh, BUT with no repeats. The script I am currently using is: <script language=javascript...
6
by: Percy NG | last post by:
Hi ... I have text file contain such data 1111222233334444 i need delete particlar char without load all data into memory says delete 1st-5th char ..then the data in text file should...
1
by: Jim Carlock | last post by:
If I'm putting together a list of links and I want to get add each item one at a time inside a foreach($aNames as $sName) loop, is there an easy way to get the number of pixels that the $aName...
2
by: Pipex News Group | last post by:
I Have a text file that I want to delete using the On Click event of a forms button, the text file is along the following path: C:\1.txt I have managed to create the text file from Access...
6
by: 000dreamsound000 | last post by:
Hi I need help with to access a text file over my local network. I need to be able to create,read, write and delete the txt file on a specific machine(s) from any computer over the network. The...
1
by: StanislavPetrov | last post by:
Is it possible to delete the text inside .txt file?And if so,how?
3
by: Mike | last post by:
Is there a way to determine if a user deleted text in a asp:textbox? I have a textbox were users can enter in a product number, then they click a button to see if the product numbers(s) exists in...
1
nev
by: nev | last post by:
i have a textbox.text = "hello" given a start point = 2, i would like to delete the 2 'L' my final textbox.text = "heo" how to do this?
6
by: Bryn Moorhouse | last post by:
Hi there, I am a beginner at programming, and wanted to know how to remove text. For example, I am trying to get the username of the logged on user (e.g. Bryn)into a variable. I did this with ...
0
by: taylorcarr | last post by:
A Canon printer is a smart device known for being advanced, efficient, and reliable. It is designed for home, office, and hybrid workspace use and can also be used for a variety of purposes. However,...
0
by: aa123db | last post by:
Variable and constants Use var or let for variables and const fror constants. Var foo ='bar'; Let foo ='bar';const baz ='bar'; Functions function $name$ ($parameters$) { } ...
0
by: ryjfgjl | last post by:
In our work, we often receive Excel tables with data in the same format. If we want to analyze these data, it can be difficult to analyze them because the data is spread across multiple Excel files...
0
BarryA
by: BarryA | last post by:
What are the essential steps and strategies outlined in the Data Structures and Algorithms (DSA) roadmap for aspiring data scientists? How can individuals effectively utilize this roadmap to progress...
1
by: nemocccc | last post by:
hello, everyone, I want to develop a software for my android phone for daily needs, any suggestions?
1
by: Sonnysonu | last post by:
This is the data of csv file 1 2 3 1 2 3 1 2 3 1 2 3 2 3 2 3 3 the lengths should be different i have to store the data by column-wise with in the specific length. suppose the i have to...
0
by: Hystou | last post by:
There are some requirements for setting up RAID: 1. The motherboard and BIOS support RAID configuration. 2. The motherboard has 2 or more available SATA protocol SSD/HDD slots (including MSATA, M.2...
0
by: Hystou | last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can...
0
jinu1996
by: jinu1996 | last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.