Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 6
Default Excel VBA code under MSProject

Is it possible to run the following code snippets from a Microsoft Project
Macr? If it is possible to run the code, how might I convert it or make it
run under Project.

I am exporting timescaledata and would like to do some formatting of the
sheet for the user.

Thanks
Jeff

================================================== ==Sub SameAsAbove()
'Any blank cell in column A will be changed to be the same as the cell above
it
Dim LastRow As Long
Dim cell As Range
Dim DataRng As Range
LastRow = Cells(Rows.Count, "b").End(xlUp).Row
Set DataRng = Range("b2:b" & LastRow)
For Each cell In DataRng
If cell = "" Then
cell = cell.Offset(-1, 0)
End If
Next cell
End Sub

================================================== =
Sub Select_Conditional_Rows_WithLoop()

Dim col As Range, cell As Range, rng As Range
Set col = Intersect(ActiveSheet.UsedRange, Columns(1))


For Each cell In col
If Right(cell.Value, 5) = "Total" Then
If Not rng Is Nothing Then
Set rng = Union(cell, rng)
Else
Set rng = cell
End If
End If

Next
rng.EntireRow.Select
Selection.Font.Bold = True
End Sub
=================================================
Sub PrepWork()
Range("A1:A2").Select
Selection.Cut Destination:=Range("B1:B2")
Columns("A:A").Select
Selection.Delete Shift:=xlToLeft
End Sub




Reply
Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Posting Rules

Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On


Similar Threads
Thread Thread Starter Forum Replies Last Post
excel date scheduling not msProject 4pinoy Excel Worksheet Functions 0 November 11th 06 08:33 PM
Linking Data from MSProject to Excel OgdenLB Excel Discussion (Misc queries) 0 March 9th 06 12:31 AM
An .xls template that acts like MSProject? (dependencies, etc) uttster Excel Discussion (Misc queries) 0 February 7th 06 10:29 PM
Hyperlink from MSProject to Excel? Tony H. Excel Discussion (Misc queries) 0 August 5th 05 06:52 PM
Sort (in Excel) from code in MSProject Peter Darmody Excel Programming 2 October 16th 03 04:36 AM


All times are GMT +1. The time now is 01:21 PM.

Powered by vBulletin® Copyright ©2000 - 2024, Jelsoft Enterprises Ltd.
Copyright ©2004-2024 ExcelBanter.
The comments are property of their posters.
 

About Us

"It's about Microsoft Excel"