Thanks alot Skip the new version worked like a charm. I made one modification to force the alpha characters to lower case.
Function testit(rng As Range)
Dim a, s As String, byt As String, i As Integer, sOUT As String
a = Split(rng, " ")
testit = Left(a(0), 1)
s =...
Skip and Tony thanks for your input and sorry about the late reply.
Tony
I tried saving the formula. Didn't know that was possible.
Can named formulas be accessible from other workbooks similar to the personal macro workbook? If I could do that I can think of alot of utilities that I use...
I have created a rather complex formula to parse out some text data into a specific format. I would like to be able to store this as a function and/or be able to apply this formula as a macro to a long list using a FOR EACH...NEXT statement.
How can I save this formula as either a function or a...
Skip and PHV
Assigned you both stars but forgot to include a Big Thanks!
Entire code now runs perfectly.
Don't know how we'd all survive without your help.
That was it PHV
Sub testit()
With ActiveCell 'paste active cell value in column
.Copy
With ActiveSheet.UsedRange
Range(ActiveCell, .Cells(.Row + .Rows.Count - 1, ActiveCell.Column)).PasteSpecial xlPasteAll
End With
End With
End Sub
Works...
When I copied your last entry AS IS into a new worksheet. I placed data in column A rows 2 to 10 and data in B2 making this the active cell.
When I ran the macro it said compile error: Variable not defined and highlighted UsedRange
If I placed a statement:
Dim UsedRange as range
I get the...
Skip,
I get an error at the highlighted line. "Object Variable or With block variable not set.
Sub SetColumnWidth15()
'
' SetColumnWidth15 Macro
'
'
Dim strRecordB As String
Dim r As Integer
Dim i As Integer
Dim y As Integer
Dim x As Integer
Dim c As Integer
Dim...
Skip,
I'm closer than I was but it is pasting all the way to the last available row in the worksheet.
Obviously the usedrange property has it's limitations if the worksheet has been previously altered.
How can I limit the pasting to only the rows with data in the adjacent column to the left?
I'm having trouble with the syntax when naming a range for pasting the value of a single cell into the same column but down to the last row of data.
So if Activecell.address is $D$2
X = Activecell.column (ie 4)
Y = activecell.row (ie 2)
r = ActiveSheet.UsedRange.Rows.Count (say it's row 5)
I...
PHV
I have noticed that when the pick folder screen displays for the user to choose the location for the output, should the user change his mind and click cancel the routine continues to run and output the report.
I'm confused as to whether there should be some sort of cancelled event in the...
Good News. The following code works with a few caveats:
With Me.frame_ChooseReport
Select Case [frame_ChooseReport]
Case 1
stDocName = "rpt_WellHeader_Pinedale"
If Me.lbo_PrintSelectWells.ItemsSelected.Count = 0 Then
MsgBox ("No Items Selected for Printing")...
Function PickFolder(strStartDir As Variant) As String
Dim SA As Object, f As Object
Set SA = CreateObject("Shell.Application")
Set f = SA.BrowseForFolder(0, "Choose a folder", 16 + 32 + 64, strStartDir)
If (Not f Is Nothing) Then
PickFolder = f.Items.item.Path
'PickFolder = ("My Computer")...
PHV
When I replace
Call PickFolder(strStartDir)
with this:
strStartDir = PickFolder(0) as suggested I get an error
"Object variable or With block variable not set"
MazeWorX
thanks for catching the spaces but it had no positive effect for output. The file is not being created.
could it be...
Sorry the line of code that doesn't work should read as follows:
DoCmd.OutputTo acReport, stDocName, acFormatPDF, strStartDir & " \ " & FileName & ".pdf", False, ""
I posted an edited line that didn't work either.
thread705-1380756
Using PHV's PickFolder function (see thread above) I've created the following code:
Private Sub cmd_PrintProg_Click()
'Perfoms Print report routines based on the option group selections
On Error GoTo Err_cmd_PrintReport_Click
Dim stDocName As String
Dim stDocName2...
thank you all for your suggestions.
The solution that I will use as a list box on my report is:
SELECT TOP 1 *
FROM (SELECT "WellHeader" as TableName, Format(Max(DateModified),'mm/dd/yyyy') AS LastDateModified
FROM data_WellHeader
WHERE API=[Reports]![rpt_WellHeader_Pinedale]![API]
UNION...
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.