Tag Info

Hot answers tagged

4

To keep it simple, just add following rows to your code before "strFilename = strOutputFolder & "\" & strItem": strItem= replace(strItem, "~", "_") strItem= replace(strItem, """, "_") strItem= replace(strItem, "%", "_") strItem= replace(strItem, "#", "_") ' and so long ... strFilename = strOutputFolder & "\" & strItem [UPDATED] Well, as ...


2

You need to use the Value property of the Range object instead of the Formula property: ws.Range("A" & lastRowofA & ":A" & lastRow).Value = "datewanted" If datewanted is a variable in your VBA code containing a value to be inserted into your cells, simply drop the surrounding quotes: ws.Range("A" & lastRowofA & ":A" & ...


2

Put these two subs in a standard module and the run MakeButton Sub MakeButton() ActiveSheet.Shapes.AddShape(msoShapeOval, 228#, 557.25, 126.1, 126.1).Select With Selection .Characters.Text = "1 ADDER" .ShapeRange.Fill.Visible = msoTrue .ShapeRange.Fill.ForeColor.SchemeColor = 3 .ShapeRange.Line.Visible = msoTrue ...


1

We will just use formatted values: Sub qwerty() Dim i As Integer Dim s As String i = 2 Do Until Cells(i, 1).Value = "" If (s = "") Then s = Format(Cells(i, 1).Value, "0000") Else s = s & ", " & Format(Cells(i, 1).Value, "0000") End If i = i + 1 Loop Cells(1, 2).Value = s End Sub


1

You use your variable mystr in this line - With ActiveSheet.QueryTables.Add(Connection:=mystr, Destination:=Range("$A$1")) mystr = "URL;http://apps.webofknowledge.com.ezproxy1.lib.asu.edu/Search.do?product=WOS&SID=1BzJbqm9xDW5Yzj4rhB&search_mode=GeneralSearch&prID=44dc4b3a-138a-4532-8429-772860bea673" But then you redefine it before calling ...


1

Typically, attributes set in an ODBC connect string will override attributes set in a DSN.


1

So, the issue is that Workbooks(wbs) is not recognized as a Workbook object. This is because the argument in parentheses is expected to be an index, i.e., an integer, not a file path. One solution is to loop through the Workbooks collection and compare your desired path to the paths of open workbooks. Then set a Workbook object equal to the matching ...


1

Each TextRange has a Runs collection. If all of the text in the range is identically formatted, there'll be only one Run in the collection. If the font/size/color/boldness changes midstream, the Runs collection will be incremented. Accessing each Run in the collection gives you a TextRange whose font properties you can examine. Assume for example that ...


1

If they're uncompressed (i.e. not DOCX format), any file-search tools, such as Windows find can count them. If they're in Zip compressed format, the free Agent Ransack can search within the files, as well as in uncompressed documents. It shows a summary with counts, as well as the name of each document with the search string and each line containing it.


1

Give this a try: Private Sub Worksheet_Change(ByVal Target As Range) If Intersect(Target, Range("A:A")) Is Nothing Then Exit Sub Application.EnableEvents = False Target.Offset(0, 3).Value = Target.Value Target.Clear Application.EnableEvents = True End Sub


1

This is a MAPI_E_INVALID_ENTRYID error. It may indicate that your PST file is corrupted. Try to run scanpst.exe utility to fix it and after that try to run your script again. Also, you may want to try running the script for items in another PST file(s). EDIT: It happens sometimes that Outlook profile is corrupted and behaves in a weird way. You can try to ...


1

I'd do it with pivot chart: put KRA to "axis fields" and total rating to values (use max function). To facilitate updating of your chart convert your data range to data table first so you won't need to change source data range when you enter data. Also you can add very simple code to your sheets module to update chart when data changes. (just change ...



Only top voted, non community-wiki answers of a minimum length are eligible