Timme1:
I believe there to be some other problem with your code. If you run the following example written as you describe it selects each of the columns from A to IV.
Sub LoopColumns()
Dim iCol As Integer
iCol = 1
Do While iCol <= 256
Columns(iCol).Select
iCol = iCol + 1
Loop...
francky:
Disable Macro Message Box
The Macro Virus Protection feature in Microsoft Excel is designed to warn you when the workbook you are opening contains macro code. When you receive the warning, you can enable or disable the code. The only way to prevent this is to change the security...
nimo:
As rmikesmith stated, why don't you protect the sheet after you create the buttons the way you want. This way the sheet will still be protected so the user cannot make changes, and you won't receive your errors.
Regards, LoNeRaVeR
RobBroekhuis & gregoriw:
I realize that this is not related with regards to printing, but I worked on an Excel project to send E-mail based on information in an Excel spreadsheet and after some research, trial, and error I discovered this method. Perhaps you could use the same method to send...
Zenkai:
You can use the following to return the relative address without the absolute $ designators.
expression.Address(RowAbsolute:=False, ColumnAbsolute:=False)
Regards, LoNeRaVeR
venkman:
The following code will run the sub RUNTHIS whenever the escape key is pressed.
Application.OnKey "{ESCAPE}", "RUNTHIS"
Regards, LoNeRaVeR
tyhand:
Excel keeps the same range of cells so that when you insert a column it moves that range to the next column.
Set your range again after you insert the column to H:H.
Regards, LoNeRaVeR
SBendBuckeye:
Both RobBroekhuis and my examples select only those that contain formulae. RobBroekhuis's example will traverse all the sheets in the workbook.
Regards, LoNeRaVeR
SBendBuckeye:
The following code will select all the cells that contain formulae in one sheet and loop through them.
Dim oCell As Object
Cells.SpecialCells(xlCellTypeFormulas, 23).Select
For Each oCell In Selection
MsgBox oCell.Address & " " & oCell.Formula
Next oCell...
RobBroekhuis:
No wonder I didn't know about it. I'm still used to programming in XL97.
funkmonsteruk:
Here is the code that I used in XL97
For iChar = Len(sPath) To 1 Step -1
If Mid(sPath, iChar, 1) = "\" Then
sFile = Mid(sPath, iChar + 1)
Exit For
End If...
amember
Your original code was:
With Sheets("List")
This may not be the answer, but is the code exactly as shown above? Maybe the answer should be
With Sheets("Lists")
Is the problem because the sheet is not named List, but is actually Lists? LoNeRaVeR
aMember:
The code works provided that you have a Sheet named Lists, a Range defined as Titles, and have a value assigned to the variable BookTitle.
Dim Titles As Range
With Sheets("List")
Set Titles = .Range(.Range("Titles").Address, _...
RobBroekhuis:
That is much easier than looping from the end of the path string looking for the "\" as I have been doing for years. I knew about the InStr function, but I was not aware of the InStrRev function. That is extremely helpful and worthy of the first that I have awarded...
Any [color blue]Microsoft Excel[/color] user with large ranges of formulae has experienced the slow response of calculations each time a change is made in a worksheet. Sure you could turn the calculation off, but what if you still want some of the formulae to calculate? One solution is to...
xjlkx:
As Loomah stated, John Walkenbach's site includes a wealth of VBA information. I own a few of his books, and they are well written and informative, but I would not normally suggest them to a novice programmer.
I do not believe that the Tecumseh Group, Inc. allows the promotion of...
FrodoBaggins:
You can normally find the last row of data by using
iRow = Cells(1, 1).SpecialCells(xlLastCell).Row
This works with most text files. However, some Excel files where data was previously deleted may not provide an accurate LastCell since it looks for the last edited cell. A...
TomG1:
I apologize. My code was written in Excel VBA, and it won't transfer. I'm not familiar with Word VBA. I know that you will use the CommandBars("Menu Bar") object, but I'm not sure how to add items within the Menu Bar. If I find something, I'll let you know.
Take care...
TomG1:
In what application are you attempting to create the Menu (Access, Excel, Outlook, Word) and what version are you using (95, 97, 2000)?
LoNeRaVeR
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.