On the toolbar of the VBA project sheet, there is a box that lists the line number and column of each individual letter of code. Is it possible to use that line number in code, as an example:
[Select Case aaaa2]
[Case VbNo]
[If aaaa2 = VbNo Then Resume ln39, col2]
PHV, your solution worked perfectly. BTW, I think you gave me the named range code that I am using in this a couple of years ago. So, thanks for the named range code and for this new code.
After I saw yours, I realized I had sort of been all around what you did, just never thought of moving...
Dim x As Date, xx As Integer, thisTime As Date,Date1 As Date
Dim y As Date, z As Integer, a As Integer, b As Integer, bb As Integer, aa As Integer
With Activesheet
Cells.Clear
aa = 10
bb = 9
b = 384
Date1 = Format$(Date, "dd-mmm-yyyy hh:mm")
Cells(9, 1).Value = Date1...
I know this is probably the wrong forum for this question, but I do not know where else to ask.
Is it possible to open E mail in Microsoft Outlook from an Excel Spreadsheet using a Macro?
yes, but with 11,588 rows and 10 columns, it is not easy to check each row to see how the sort worked. The data I am being given to work with has been downloaded to Excel from something called "Crystal Reports", and I have had more than my share of trouble writing code that works.
So, I thought...
The Macro recorder gave me this:
[Range("A1:K11588").Sort Key1:=Range("A1"),]
The bottom row will not always be 11588, so,
Can I replace the hard coded range with:
[With Activesheet]
[.cells(1,1).currentregion.sort]
I would like help with something like this:
[If printout.page.count = 5 then Active.workbook.save else _
error in printout]
The page count will always be 5, so I just want to be able to count how many times the print command has been sent to the printer at a given time.
[Dim x As Date, xx As Integer]
[x = Cells(1, 1).Value]
[xx = 12]
[Cells(2, 1).FormulaR1C1 = "=Edate(R1C,R1C2)"]
Can I use "Edate" with variables, as in the line of code below.
If I could at least figure out how to use a variable for 12 it would help a lot.
[Cells(2, 1).FormulaR1C1 =...
Fumei,
I understand your concern with use of Flash Drives for long term storage. But that is not what I am doing. We have no physical connection between the computers we use at work and the outside world. So, anything I figure out at home, help I get from here or from the internet, I have to...
Skip, I am ready to learn something new. Tell me what to do.
I found Export File. When I clicked on it, it took me to something called Office10.
So, where do I need to export the module to and how do I reopen it if I need the code. And, can I export to a USB (Flash) Drive.
Thanks.
WaterSrite
The reason I prefer to use code for the spreadsheets is that others use them and I have learned that if there are formula's in the individual cells, sooner or later someone is going to play with them. If I do everything in code, they can play all they want, but no permanent damage done.
And...
This site uses cookies to help personalise content, tailor your experience and to keep you logged in if you register.
By continuing to use this site, you are consenting to our use of cookies.