Every time I copy and paste a small object "jpg" or "png" into a cell it defauts in the cell to the left and top edge s of the cell. I would like the object to be centered in the cell. I can drag the object to "Close to Center", but I have green and red go/no go dots in 120 cell going downward I would would really like to see them aligned.
I have a basic data table with KPI labels down one side and dates across the top. Using this data table as the series source, I create a number of charts below it with serialised names eg Chart0, Chart1, Chart2, etc. I am attempting to enable the KPI labels so that when a user clicks it, the spreadsheet will navigate to the appropriate chart. I place the name value for the chart object in the cell immediataly to the left of each KPI label (and hide it). This way I know which chart object below is related to which KPI label above. That part works. I have a Worksheet_SelectionChange() event procedure attached to the charting worksheet. When a user clicks into one of the KPI labels, the event procedure fires and the appropriate chart is activated. The code is:
Private Sub Worksheet_SelectionChange(ByVal Target As Range) If Not Intersect(Target, Range("B5:B19")) Is Nothing Then On Error Resume Next chtObjName = Range(Target.Address).Offset(0, -1).Range("A1").Value If Left(chtObjName, 5) = "Chart" Then ActiveSheet.ChartObjects(chtObjName).Select If Err.Number <> 0 Then MsgBox "No such chart exists.", vbCritical, _ "Chart Not Found" End If End If On Error Goto 0 End If End Sub
I have searched high and low and cannot seem to find an answer. I have inserted an ActiveX button in a cell to run 3 macros when pressed. I cannot get the 4-letter name on the button to appear centered on the button, unless I make the button larger than the cell, which I do not want to do.
adjust the following code so that my images are just a bit lower than "top aligned"? The code centers my images perfectly within the cells, but when you top align an image, it's just a hair too high and border formatting does not come out.
I have 2 equation objects created with microsoft equation 3.0. I have named the equation objects Eqn9 and Eqn10. I also have an if function, what i would like to do is if a number in cell AC58 is greater than 0.3 a macro runs and hides Eqn9 and shows Eqn10, similarly if the number in cell Ac58 is less than or equal to 0.3 the macro hides Eqn 10 and shows Eqn9.
I have a piece of clip art in a cell (that moves around in the right cell when i filter/sort the data). i need to know how to select/activate the cell that a piece of clip art housed in. is there a way to say at the beginning of the macro to select the cell behind the picture?
Macro works by offsetting a few cells to the left and pulling the name of the item in that row and then going to another worksheet that is named the same thing as what is in the cell i offset to. If i click on the cell behind the picture first then it works but if i have a diff cell activated when i click the picture it of course doesnt work - so all i need is a way to activate the cell behind the picture.
I want to copy an embedded object and and then paste it on the last used cell. However everytime i do this an error occurs.
Sub last_cell() Sheets(" Analysis").Select ActiveSheet.Shapes("Object 10").Select Selection.Copy Selection.SpecialCells(xlCellTypeLastCell).Select ActiveSheet.Paste End Sub
The error occurs in this line ( Selection.SpecialCells(xlCellTypeLastCell).Select ). Best Regards Faisal
I am using excel to stop and start a service on the network and have that part done when using a txtfield to enter in the PC ID. What i want to do is use a list of PCIDs and pass them to my service object to stop and start the service.
Private Sub CommandButton1_Click()
Worksheets("PCIDs"). Range("B2").Select 'my issue is here Range("B2").Activate 'and here
Do Until IsEmpty(ActiveCell) Call StopService("ServiceName") ActiveCell.Offset(1, 0).Select Loop
Range("B1").Activate Do Until IsEmpty(ActiveCell) Call StartService("ServiceName") ActiveCell.Offset(1, 0).Select Loop
Worksheets("ServiceName").Select End Sub
and with this function i need it to pass as a string to txtDeviceID. I have tried just simply setting txtDeviceID as ActiveCell but it didn't like that.
Public Function StopService(ServiceName As String) As Boolean
Dim oSysInfo As New ActiveDs.WinNTSystemInfo Dim oComp As ActiveDs.IADsComputer Dim oSvcOp As ActiveDs.IADsServiceOperations Dim sCompName As String Dim sSvc As String Dim lRet As Boolean
I would like to conditional format an Object depending on the variance between 2 weeks.
If the value is > than 0% the arrow is Green and points upwards. If the value is = to 0% the arrow is Yellow and points at at 90 degree to the left. If the value is < than 0% the arrow is Red and points downwards.
Attached is a sample : rrow Conditional Format.xlsm
I am trying to find particular text in a cell then format adjacent cells in the same row. In my code below I am trying to search for "*[Tx]*" using Like, however this is formatting all text that contain "T".
I have the following code in Destination.xlsm that is intended to:
request the user to select a multi-cell range in a column of single-sheet Source.xlsm, in which some but not all cells contain "Y" (to indicate that this row of data relates to a National Account, versus a Territory Account)loop through the selected range, and whenever a cell contains "Y", copy the entire row and insert it in Destination.xlsm above a cell named "rngDest".
Code:
Sub Copy_NationalAccounts_Rows()
Const Message As String = "Select the entire range containing National Account Y flags, then press Enter or click OK." Const Title As String = "Copy National Accounts"
Dim rngSource As Range Dim rngDest As Range Dim r As Range Dim c As Integer Dim wbk As Workbook
1) i have office 2003 on a laptop. within powerpoint, i can create a 'microsoft excel chart 11' object. to create a link to the excel data source, do i have to go through the odbc sql setup? it works, but i don't want my powerpoint to be dependent on some excel file somewhere. what are the other options to insert/make a functional pivot chart in powerpoint with the data also within powerpoint? the data as sheet option does not result in the chart being a pivot, it's just a plain chart. it has to be a proper object, not an image paste or a chart that updates links with the excel file open.
2) i have office 2007 on my other laptop. i can not find any suitable object to choose from to make a pivot chart in powerpoint. what's the best way to go about in 2007 version?
3) am i going about this the wrong way with the objects? should i be after vba code?
I have a range of cells that change colors with conditional formats based on the cell value from high to low. I would like to link the cell color to an object such as a circle or rectangle. When the cell value changes along with the conditional format, the color of the object will also change.
I have a very strange problem in DEBUG mode, because i get this error "Application-defined or object-defined error" when referring to a cell and assigning it a value so it goes to my error handler and i have a Resume Next there. It continues to go through the code whilst continuing to go to the error handler but when i step out of the function it restarts again from the beginning on the called function and then on the second run of my code it seems to WORK!?! So i'm thinking what the hell is going on, it falls over and fails the first time round and works the second time round? In free-run mode from excel i just get a #VALUE!