Tag Info

Hot answers tagged

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 ...


2

This does what you want. When you run VBa, there is no undo, so take a backup of your file first and play with a copy!! Please note the comments in the code, this is things you will need to update I have also assumed you're not using worksheet2 so this code uses it! Option Explicit Sub SaveAsNewRow() Dim sourceData As String sourceData = "A1" ...


2

By using the function Tools->Macro->Record New Macro..., you can do all your operations like before (with Keyboard and Mouse) and after that (stop record) you can take a look at the generated macro-code.This can help in many cases. If you have any special problems, please post your code.


2

Put any Shape or AutoShape on the worksheet and assign this macro to it: Sub SaveResults() Dim N As Long If Range("N7").Value = "" Then N = 7 Else N = Cells(Rows.Count, "N").End(xlUp).Row + 1 End If Cells(N, "N").Value = Range("M3").Value End Sub


1

Starting with data like: Running this macro: Sub qwerty() Dim J As Range, L As Range, r As Range Set J = Intersect(ActiveSheet.UsedRange, Range("J:J")) Set L = Intersect(ActiveSheet.UsedRange, Range("L:L")) For Each r In J If Left(r.Text, 1) = "$" Then r.Copy r.Offset(0, 1) r.Clear End If Next ...


1

I found a work arround to this. Instead of changing the Itens, I created a VBA script to name all the ranges linked. So instead of changing the link item in Word, I change the named range value in excel. The link item remains the same, but it points to a range that can be pragmatically modified. Here's the code I put together to put names to ranges: Sub ...


1

I think the function call should be: Target.Hyperlinks.Add Anchor:=Target, Address:="http://stprs533/tickets/list/single_ticket/" & Target.Value, TextToDisplay:="Ticket #" & Target.Value I just changed both occurrences of c to Target, which I think will do what you're describing. The 'Object required' error is being thrown because c hasn't been ...


1

What I was talking about in my previous answer that got downvoted, in practice: Public Function EndDayTimeM(StartTime As String, Minutes As Double) Dim start As Date, starthour As Date, endhour As Date, minutes2 As Date start = CDate(StartTime) minutes2 = DateAdd("n", Minutes, 0) starthour = 8 / 24 'working day starts at 8 endhour = 16 / 24 'working day ...


1

Office 2013 installs VBA 7.1. With it, an updated versions of FM20.dll - which in turn has a dependency on the VC10 redistributables - specifically msvcr100.dll. When VBA 7.1 is uninstalled - it does not remove FM20.dll - but the accompanying application most likely will remove the VC10 redist. When it does, FM20.dll is broken. It's not that it's corrupt ...


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