Tracking Forums, Newsgroups, Maling Lists
Home Scripts Tutorials Tracker Forums
 
  HOME    TRACKER    Visual Basic




How To Bold A Cell In Worksheet


Hi All,
I would like to know how to bold a cell in a worksheet.
Any help/code would be appreciated.
Thanks.
DEK




View Complete Forum Thread with Replies

See Related Forum Messages: Follow the Links Below to View Complete Thread
Writing A Cell Address Of A Cell In 1 Worksheet To A Cell In Another In Same Workbook
Hi……..
Its an urgent requirement….
I have an excel sheet. I need to write the macros in VB for the following requirement:
There are three worksheets in a single workbook.. worksheet3 contains some values in every cell. whenever user writes in something in the cell in worksheet1, the column number and row number from worksheet3 must get written automatically in the adjucent cell in worksheet1 only.

For example:
A worksheet 3 contains PLZ A,B in row 5 and column 7. These rows and columns are user defined. If i write PLZ 31, 20 in F26 in worksheet 1 then automatically G26 must contain value 75, G27 must contain a value 31 and G28 must contain a value 20.

I can't say when this value should get populated. Either on the lost focus of F26 or i need to run a macro manually for F26.
 what would be the code in both the cases? Is the former case possible? If i select group of cells like F26 present in worksheet1 and altogether run a macro then would it give the result?

Thanks in advance for your reply.
Regards...
Priyadarshini

Insert Cell Format && Get Cell Value Without Selecting Worksheet
Hello
       I am trying to tidy up a workbook. I have several macro's, one of them insert a new line with different cell formats in to different worksheets and most of the others get a cell values for creating reports.

The only way I know of inserting / getting a cell value is to select the worksheet and run the macro

        Sheets("Works Schedule").Select
            
        ' Run code

This way works but is their a way of running the macro with out selecting the worksheet to stop the workbook flickering between each sheet whiles the macro is running


Thanks
          Tom

Appending Data From A Cell To Another Cell In Another Worksheet
I'm automating excel using vb 6.0. The code appends the result of a select statement on to an excel file. This is a daily routine and data changes everyday. Is there a way of appending data from a cell and permanently storing it to another worksheet.
E.G.
DAY1
In worksheet 1 cell A1 contains the number 75 .. i wish to append it to Worksheet 2 cell A1

DAY2
In worksheet 1 cell A1 contains the number 85 .. i wish to append it to Worksheet 2 cell A2

.... and so on .. Worksheet 1 changes daily. Worksheet 2 should be filled with data everyday (filling up A1, A2, A3)

Thanks In Advanced

Find A 'bold' Cell And Do...
G'day,

I'm trying to get a wee programme (using VBA) to search a work sheet (sheet1) from cell F5 (right and down) for all cells that contain bold.

For each cell that is bold I'd like to put a number (changes for each column) into the corresponding cell on another sheet (sheet2).

I've been mucking around with the


Code:
Set blob = .find(parameters)

but I'm not quite sure how it all works.

I think it's important to store the location (eg. "G9") of each bold cell as a variable and move this across to the other sheet, but yeha, I'm quite stumped here. Perhaps creating a variable, for which a bold cell = true and for anyother cell = false, and going from there.

Any suggestions would be great!

Ta,
Goldmole

Separate A Cell Value Based On Being Bold?
Suppose I have this value in a cell

text = "MY Name is Cheetah"

How to separate it (maybe using mid function) into
text1 = "My Name" or "My Name" &
text2 = "is Cheetah" ?

Thanks

Make Excel Cell Bold
how would i take a specific cell and make it bold...

IE

ExcelApp.Range("A1").Value = "TEST"

now how would I make TEST bold via code?

How To Add Cell Comment With Bold Text
Hi,

I am trying to add a comment to a cell in Excel. Adding a comment is no problem but I want to be able to resize the comment and change the text to bold text.

Any ideas ??

Thanks
Steve

How Do I Make A Portion Of Text In Word Cell Bold?
I've created a word template with a table in it.

In one cell I am entering multiple lines. I'd like the first line (the name) to be bold.

I'm using asp and cannot figure out the correct property to call.

Here is part of the source code:


Code:
Set objWord = CreateObject("Word.Application") ' Create a Word object.
Set WordDoc = objWord.Documents.Add("C:Incident.dot") ' Start a document.
objWord.Application.Visible = False

With WordDoc
Open recordset here

Code:
Do While Not rsPeopleList.EOF
.Tables(7).Cell(row, col).Range.InsertAfter (rsPeopleList("LastName") & ", " & rsPeopleList("FirstName") & " " & rsPeopleList("MiddleName"))
.Tables(7).Cell(row, col).Range.InsertAfter (vbcrlf & vbcrlf)
If rsPeopleList("EmployeeRole") = "" Then
.Tables(7).Cell(row, col).Range.InsertAfter (vbcrlf)
Else
.Tables(7).Cell(row, col).Range.InsertAfter (rsPeopleList("EmployeeRole") & vbcrlf)
End If
.Tables(7).Cell(row, col).Range.InsertAfter ("Employee Number:" & vbTab)
If rsPeopleList("EmployeeID")="" Then
.Tables(7).Cell(row, col).Range.InsertAfter (vbcrlf)
Else
.Tables(7).Cell(row, col).Range.InsertAfter (rsPeopleList("EmployeeID") & vbcrlf)
End If
...

Thanks,

Julie

MSWORD Making One Word Bold In A Table Cell.
Hi

I am creating a report in word using tables in VB6.



One of the cells contains a surname and then two foren
ames for married
partners. I need to have the surname in bold and the
forenames as
normal.

When I do this I can make the whole cell bold or n
ormal. Can anybody
help?

Regards

Peter



Important Note: This E-Mail is confidential, it must not
be read,
copied, disclosed or used by any person other than the
above
named addressees. Unauthorised use, disclosure or copying is

strictly prohibited and may be unlawful. Eurostar (U.K.) L
imited
and Eurostar Group Limited disclaim any liability for any
action
taken in reliance on the content of this E-Mail. The c
omments
or statements expressed in this E-Mail are not necessarily
those
of Eurostar (U.K.) Limited, Eurostar Group Limited or any
subsidiaries or affiliates of either company.
Eurostar (U.K.) Ltd. Registered Office: Eurostar House, Wate
rloo
Station, London, SE1 8SE, Registered in England No. 246200
1
VAT No. GB 657 719 590
Eurostar Group Ltd. Registered office: Eurostar House, Water
loo
Station, London, SE1 8SE, Registered in England No. 379464
2
VAT No. GB 739 974 173

This email has been scanned for all viruses by the Mes
sageLabs Email
Security System on behalf of Eurostar. For more informatio
n on a proactive email security service working around t
he clock, around the globe, visit http://www.messagelabs.com

Change Font Bold Of A Cell In A Table In Word From VB
I've used some code from johnwm in thread222-589129 some time ago to help me make the table.  From that I've figured out how to change the "header row" background color.  Now I'm trying to change the "header row" font to bold but I'm having diffieculty.  Can someone help.  Here is the how I change the color of row 1 for each column.

CODE'This will change the color of the header row in the table
    With MyRange.Tables.ITEM(1)
    
        For g = 1 To .Columns.Count
'            .Cell(1, g).Select.Font.Bold = wdToggle
            .Cell(1, g).Shading.BackgroundPatternColor = wdColorYellow
        Next g
    
    End With

How To Make A Cell's Font BOLD && Color RED Using If Condition In MSHFlexgrid?
Dear Friends,

How to make a cell's font to BOLD & font color to RED using if condition in MSHFlexgrid?

I want to modify the following code to get the above result:


Code:
Dim Y As Long
With MSHFlexGrid1
For Y = .FixedRows To .Rows - 1
.TextMatrix(Y, 5) = Format(.TextMatrix(Y, 5), ("###,###.00;;DELETED "))
Next Y
End With


The above code is working fine. But, now what I would like to do is to apply a if condition in the same code to get the following result:

If the cell value is "0.00" then it should fill the cell with "DELETED". Upto this level it is working fine. But I want to apply the condition that If Cell Value is equal to "DELETED" then it should change the Cell font to BOLD and color to RED. How can I do it?

Help me please.

vblearner6

Worksheet Name = Cell Value
Im looking for a way to rename a worksheet based on the value entered into a cell. I know how to set it to run the code when the sheet is opened, changed, or whatever but i dont know what code to execute to make excel rename the sheet to a cell's value when the cell's value changes any help greatly appreciated

Cell Location In A Worksheet
I'm new to VB coding in excel so forgive me if this is a stupid question! Is there an function or command within VBE that will return the active cell location? For example, if I issue "Selection.End(xlDown).Select" within a macro. How can I determine the location of the active cell in the worksheet?

Help? Positioning Cell(s) On Worksheet...
I've tried all sorts of things... How in the world can I position a specific cell to the top of the worksheet without manually using the scroll bar? More specifically, after I goto a specific cell name or range I would like to automatically position that cell or range at the top left of the worksheet.

Worksheet Cell Copy Woes
Hello,
New to the forum and vba programming.
I am trying to automate the copying of certain cells from one worksheet to another in the same workbook.
I get an error '1004' regarding one piece of code referring to the worksheet range. Error follows:

Run-time error '1004'
Application-defined or object defined error

The code involved follows:

Do While Worksheets("Sheet1").Cells(crow, 1).Value <> ""
If Worksheets("Sheet1").Cells(crow, 5) = "x" Then
MsgBox "All code works except copy portion"

Worksheets("Sheet1").Range(Cells(crow, 1), Cells(crow, 3)).Copy _
Destination:=Worksheets("Sheet2").Range(Cells(crow, 1))


crow = crow + 1
MsgBox crow
Loop

I can eliminate the Worksheets("Sheet1").Range portion of code and all works well.
Is it possible to use the cells range language like this or must I do it another way?
Thank you in advance for your help.
Hope I've submitted correctly.
Thank you,
JCRSBJ

VB Copy One Cell To Another Worksheet By Click
Hi
I am making a part list sheet and i need the code, when u click on a row with partnr., amount, price, that it gets copied into another worksheet on a specific place.
Lets say I have 200 parts with diffrent parts numbers, i select 20 not following parts by clicking on each once, I want these 20 parts to show up in the 2nd worksheet.

Please help me.

Center Worksheet On Selected Cell
I have several named one-cell ranges in my workbook. I have one worksheet which has hyperlinks to each of these ranges. Clicking on the hyperlink causes the cursor to jump to the target cell. The problem is that the selected cell could be anywhere in the window (although it seems to be at the extreme edge more often than not).

I want the cell to be centered in the worksheet window without my having to use the scroll bars to move the worksheet around.

I've tried several different searches of the forum (various combinations of "target cell", "position", "hyperlink", "center in worksheet", etc.) without finding anything to help. I would appreciate suggestions on how accomplish this task.

I'm pretty sure clicking a hyperlink is considered an event, but what would its name be? Can positioning the selected cell be triggered by an event?

Return Worksheet Name && Paste In Cell
Sorry if this is easy, but it's been a while since I had to write code and searching in Help was useless.

I recently got a new PC with Office 2003 software. Now I have to do some edits to our file storage tracking program (that my boss and I wrote several years ago) to make it work with the new version. I'm okay with most of the edits, but I'm having trouble with the following:

I need code to return the name (on the tab) of the active worksheet (into a variable?) so that I can paste it into a specific cell on the active worksheet (specifically cell A6).

Thanks in advance,
Peg

Writing To A Cell In A Worksheet On A .xla File
Hi everybody

Is it not allowed to write to a cell on a worksheet in an AddIn workbook (one with .xla extension)?

I tried to write in to one, and whilst it didn't come up with an error at that line, it did not return anything when I tried to Debug.Print the contents of a particular that I thought was supposed to hold a certain value.

Any suggestions?


Best regards


Deepak Agarwal

Comparing The Value In A Cell And Copying Row To New Worksheet
I found this in another thread, but was unable to get it to work. I keep getting a Run-time error 9, Subscript out of range on the second line. Any ideas?


Dim x As Long, lr As Long, lr2 As Long
lr = Application.WorksheetFunction.CountA(Sheets(CRTDATQ1).Range("A:A"))
For x = 1 To lr
lr2 = Application.WorksheetFunction.CountA(Sheets(CertReport).Range("A:A")) + 1
If Sheets(CRTDATQ1).Cells(x, 11).Value = "true" Then
Sheets(CRTDATQ1).Cells(x, 11).EntireRow.Copy
Sheets(CertReport).Select
Cells(lr2, 1).Select
ActiveSheet.Paste
Application.CutCopyMode = False
End If
Next

Declaring A Formula In A Cell Of A Worksheet
I have written a program in VB6 that calculates values and then I store them in rows in a .csv file. When the program is completed, I copy the .csv file over to an Excel file. My problem is that the cells copy over as values and not as formulas. I would like to be able to enter formulas in the cells in the VB program and then when I copy over the .csv file the formulas would also copy over so if I change a value in the Excel spreadsheet the formula would calculate the proper value in that cell. My problem is that I dont know what cell I am writing to when I write in the VB program. I just write rows of data (comma delimited) and they copy over as cells in the Excel spreadsheet. Can anyone help me?

Thank you

Duane

Macro For Renaming Worksheet With Cell References
I'm trying to write code to rename a worksheet with two cell references. I'm able to do one cell reference, but can't concatenate the other. Can anyone help? This is what I have for one:

ActiveSheet.Select
ActiveSheet.Name = Range ("A1").Value

I want to cconcatenate the value in A1 and B1 and parse if it's over 31 characters long. It seems as if it should be simple, but I've come to a sudden stop.

Thanks!

How To Search For Data In The Worksheet By Specific Cell Name
First of all, I'd like to apologize if I post this topic in wrong forum. I'm a newbie for VB and now I got one project which has to be implemented in VB.

In my project, I've to write the program to fill in the data in specific cell name in excel spreadsheet. But until now it doesn't work

For example, I've data in range A1:C10 which I've one cell named 'Address', not the value of that cell, which I'd like to fill data in. Firstly, I specified the range in the spreadsheet by using

     Set rng = myWorksheet.Range("A1:C10")

then I wanna find where the cell named 'Address' is but I've no idea how to do it. Anybody has and idea? I tried with the command 'Find'

     Set rngFound = rng.Find(xxxxxxx, ,yyyyyy , Excel.XlLookAt.xlPart, _
        Excel.XlSearchOrder.xlByRows, Excel.XlSearchDirection.xlNext, _
        False)

but I don't know which parameter I'd pass to this function. Could you pls help me finding out?

Thanks in advance

Writing A Number As Text In A Worksheet Cell.
Dear Member Friends,

I want to know the code to write a number as text in a cell using VB Macro code. For example:

Currently the number 00430 is written as 430 in the cell. I want the number to be written as 00430 and not 430 as internal storage of 00430 is char string.



 

Howto Find Next Empty Cell In An Excel Worksheet?
Hi!

I'm making this program that writes to an excel file to keep a summary of information. I used the Excel object library as a reference and I can open the excel file.

My problem is how can I find the next empty cell in a column so I know where to append the next information?

Hope someone can help....

Thanks!!

Sound+color Alert If Cell Value Changed In Another Worksheet
Hello everybody ! I'm new to this great forum and vba too. Here is my first problem I hope you can help my with:

I have 2 worksheets. In the first one I enter data regularely and in the second one never because it gets data from the first one (but rarely is changed something here since it keeps track of maximum and minimum values from first worksheet). I want a way to know at the time I enter data in worksheet 1 if something has changed in worksheet 2 (the way I would prefer the alert here would be a beep) then when I go to worksheet 2 I want to easily locate the newly changed values by having their cells fond in red for a certain amount of time (lets say 24 hours - so only if their values changed today). The cells in worksheet 2 I'm talking about are D3 : D23. How do I do that ?

Thanks.

Determine Cell Location Of A Drawing Object On A Worksheet
I'd like to create a code that determines approximate or if possible the exact cell location of a drawing object on a worksheet. Any help or suggestion would be greatly appreciated. Thanks.

Search By Worksheet And Range To Return Single Cell
Can anyone please help ? I don't know where to start.

I have to create a form (preferably web to share over an intranet) to search by worksheet name and then by x-range and y-range and give the single cell value as an answer. eg. Excel speadsheet no. 1 :

Syd Mel Per <- ex
Syd 1 2 3
Mel 4 5 6 <- dest
Per 7 8 9

The form should ask ex city and destination city. As above, if it is going from Mel to Per the it should return 8. The input fields should be dropdowns preferably filled from the range. There are a few spreadsheets that are the same, and the selection criteria for them is in the name of the sheet eg. 20%, 30%, 40% which is another dropdown on the form.

How do I do this? Should I use ASP.NET or XML and should I use the script editor for Excel XP or Visual Studio .NET?

Thanks.

Same Cell Multiple Worksheet Function: Please Help, Need To Complete By Tonight
Hi! I have a file with multiple worksheetsver 75.

I need to create a new worksheet, where column a1 is the first worksheets cell b5 and b1 is the first worksheets cell d73. Then a2=second worksheet cell a1, b2=second worksheet cell d73...and so on........


Possible?
ANY HELP will be GREATLY APPRECIATED!!!

Excel Macro Performing Web Query - URL From Worksheet Cell
All

I wonder if anyone can help me with the following, please:

I'd like to use a macro to perform a web query on a URL, but rather than specifying the URL in the code, the macro picks it up from a cell on a worksheet. For example, if cell A1 on Sheet 1 contains "http://www.google.com", and I want to display the web page on Sheet 2, my attempt at the code is;

Dim myURL

myURL = Worksheets("Sheet1").Range("A1").Text

Sheets("Sheet2").Select

With ActiveSheet.QueryTables.Add(Connection:= _
"URL;" & myURL, _
Destination:=Range("A1"))
.BackgroundQuery = True
.TablesOnlyFromHTML = True
.Refresh BackgroundQuery:=False
.SaveData = True

End With

It seems to stop on the ".Refresh BackgroundQuery:=False" line - any ideas on this at all, please? I assume this can be done?

Also, if it's possible to specify the target URL in a message box, that would be ideal.

Thanks for your time, all suggestions much appreciated!

Neil

Excel, Error 1004 When Trying To Select Cell In Other Worksheet.
Hi,

I have a new problem in Excel VBA. When I try to select a cell on another worksheet it no longer recognises the object. The example below is code I have taken from running a macro but I have tried indexing the worksheets(2), naming the workbook etc with no luck. I have been told our IT Service provider doesn't support the VBA side of Excel and I will be unable to reload the software. Where the code already exists it continues to work. Not sure but the problem may have started on my first attempted at adding a CommandButton through code? (although it seems to affect all users).

Private Sub CommandButton1_Click()
Sheets("Sheet2").Select
    Range("B4").Select
End Sub

Thank you in advance for any help you can give.

Rob.

Help W/simple Transfer From Vba Form Field To Excel Worksheet Cell
Hey, I've got a real simple problem I can't get my head around. I'm just trying to copy or take data entered in text boxes (in a VBA form) and put it into a cell in a worksheet. Specifically, when the user clicks the "compute" command button I want the data from the text boxes copied or sent to excel cells.

Here's the code so far:

Code:
Private Sub cmdCompute_Click()
            
    Dim strFilePath As String
    strFilePath = "C: emp.xls" 'workbook to receive data from text boxes

    Dim xlApp As Excel.Application
    Dim xlBook As Excel.Workbook
    Dim xlSheet As Excel.Worksheet
    
    Set xlApp = New Excel.Application
    Set xlBook = xlApp.Workbooks.Open(strFilePath)
    Set xlSheet = xlBook.Sheets("Sheet1") 'worksheet to receive data
    
    xlSheet.Activate
    Range("A1") = frmMain.txtDate.Text 'data being transfered is from main form and text box "txtDate"
    Range("B1") = frmMain.txtMajor.Text 'same as previous line, but different text box
    xlApp.Visible = True
    
End Sub


Thanks for your help.

Finding A Cell Containing A Text String Input From A Textbox In An Excel Worksheet
Hello, i'm a new member to this forum and am using vb to create a userform to input job data for a lab.

i would be very appreciative for help on this particular problem.

what is the syntax for searching for a cell containing a text string (which the user inputs via a userform text box) in the active excel worksheet, and selecting it?

Any help would be greatly appreciated.

Thanks again

Code For Moving To The First Blank Cell In A Worksheet; Moving Left,right,up Or Down
I have created an application form as a userform in Excel. I need to send the data entered into my text boxes when the program runs to separate excel cells in a worksheet.

My problem is I can use code that will send the textbox entry to a specific cell eg. If my textbox is named Surname I can say

range("a5").value = surname but if I do that when I run the programme to enter the next record for someone else the first record will be overwritten.

I NEED A CODE LINE THAT WILL TAKE ME TO THE FIRST EMPTY CELL AND ALLOW ME TO MOVE DOWN OR TO THE LEFT OR TO THE RIGHT

Bold/non-bold Text On CommandButton?
Is there any way to make PART of a CommandButton's Caption bold, and part of it not bold (normal)?

For example, if I wanted the first word to be bold and subsequent words to be NOT bold...how would one do that?

Bold Vs. Non Bold Printing On Same Line
I need to print bold and non-bold characters on the same line.

Printer.print "SHIP TO: " & "ANY TOWN"

I know printer.fontbold = true will make the entire line bold. However, I need:

"Ship to" in bold

"Any town" not in bold.

Can it be done?


Thanks

Geod

 

Cell Format, Determining Type Of Cell Content (string/real/integer) And Cell Size
I am not sure whether I am at the right forum, but I am exporting Excel values in a Word document.

Unfortunately -my copy paste action doesn't take in account the cell_properties, so in some cases a value of 9,9999999999999999999999999999998E-4 is entered instead of the 9,9 E-4 or even 0,001 that is shown in the excel sheet.

I'm having trouble with finding the set format command (e.g. Tutbo Pascal: write(value:8:3) -or someting) and I also have strings in these cell -I am not sure if it gives any problems if one sets every zell to 2 decimals, if so -ho can I determin the type of cell content ...
And how to set the cell size to size of content

Could anyone help me, I 'm much obliged

Change A Cell, Change The Worksheet
Is there a way to change a cell in Excel and have that make changes to a worksheet automatically??

For instance. If I type an "m" into cell A1, I want Rows 10-15 to be hidden, but if A1 is anything other than and "m" I want those row to be shown?

Any help would be greatly appreciated.

Thanks.

Change A Cell, Change The Worksheet
I posted this before, but in the wrong section, it was accidentally posted under Databases. Sorry if you're reading this twice.

Is there a way to change a cell in Excel and have that make changes to a worksheet automatically??

For instance. If I type an "m" into cell A1, I want Rows 10-15 to be hidden, but if A1 is anything other than and "m" I want those rows to be shown?

I got this code from a helpful poster, but was having trouble making it work:

Private Sub Worksheet_Change(ByVal Target As Range)
    If Range("A1").Value = "m" Then
        Rows("10:15").Select
        Selection.EntireRow.Hidden = True
    Else
        Rows("10:15").Select
        Selection.EntireRow.Hidden = False
    End If
End Sub

When I pasted the code into the VBA editor, and tried to type an "m" into cell A1, nothing happened.
I thought maybe, I was missing some property or something. Can any one help?

Any help would be greatly appreciated.

Thanks.

Delete Worksheet, Then Create New Blank Worksheet With Same Name
Hi

I have a worksheet named "Harmonics", where I present to the user the results from my VB program.

But when the user re-runs the macro, I want to ensure that ALL the data on the worksheet is overwritten and no 'old' data is still there.

I thought the best way to do this would be to delete the entire worksheet at the start of the program then re-create the worksheet as a blank document ready for writing to. Is this a bit extreme? Would I be better to just delete all cells within the worksheet as opposed to the sheet itself?

Your help would be most appreciated.

And of course, some code to do what I want would be great!

Thanks,
Daryll

Separate Data In Worksheet Cells Then Add To New Worksheet
I have a spreadsheet with 9 columns and a variable number of rows. Each of the cells contains multiple values which include a date, time and location. I want to populate a second spreadsheet the the data from each of these cells. I have attached an example workbook which has the original data in SheetA, and the results I am trying to achieve in SheetB. The spreadsheed will be easier to understand than my explanation I think.

The data in the cells needs to be separated into individual cells in the new sheet, for each set of cell data, the associated data in columns 1 and 9 need to be added/repeated.

Is this possible?if yes, how do I achieve this?

How To Check If A Worksheet Exists In Worksheet Collection
Hi All,
   I wanted to know if there is any method to check if a worksheet exists in worksheets collection.I want to check this by worksheet name.

Thanks in advance

Regards
Raghu

How To Make Bold Text In One Textbox Bold In Another Textbox
I am writing a somewhat basic chat application, I was on the verge of releasing it when I spotted a bug. When I typed with bold text inside Text1, it only appeared normal inside Text2. Is there any way to have Text2 display the text formatting as well? I would also like to do this with the text colors.

Changing Worksheet Name When Copying Worksheet
Hi guys I have an Excel problem. I am having a worksheet and i duplicate it when i need to have it more times. Therefore I use the following code:


Code:
ActiveWorkbook.Sheets("Template_Sheet").Copy After:=ActiveWorkbook.Sheets(1)
When I copy the "Template_Sheet" Worksheet I get one with the name "Template_Sheet (2)"
How can i make the new copied Worksheet have the name I choose for it?

Thanx for any advice

To Determine The Rows To Paste A Worksheet(blank Cells To Paste Next Worksheet)
hi all experts out there....

would llike u guys to help out with a problem i am facing....


the code below is to select each of the worksheet,copy it and paste it in worksheet (printer").....i got 3 worksheets to paste into worksheet ("printer")....worksheet("11 aug"),("12 aug") and ("18 aug")....i got no problem pasting the first two worksheets("11 aug") and ("12 aug")...but i got a problem pasting the last worksheet("18 aug").....i want to paste each worksheet with a offset of (3,0) but the last worksheet paste at another cell instead......i attach the excel doc name (total)(workbook) and the macro.....the ("sub regroup")....need to be improve..pls help ......thank a lot..."P

Code:
Sub regroup()
'
' regroup Macro
' Macro recorded 9/3/2003 by SGTANCKE
'

'
Sheets("11 Aug").Select
Rows("1:" & Sheet1.UsedRange.Rows.Count).Select
Selection.Copy
Sheets("Printer").Select
Range("A1").Select
ActiveSheet.Paste

Sheets("12 AUG").Select
Rows("1:" & Sheet2.UsedRange.Rows.Count).Select
Selection.Copy

Worksheets("Printer").Activate
ActiveCell.Offset(rowOffset:=3 + Sheets("Printer").UsedRange.Rows.Count, columnOffset:=0).Activate
ActiveSheet.Paste

Sheets("18 AUG").Select
Rows("1:" & Sheet3.UsedRange.Rows.Count).Select
Selection.Copy

Worksheets("Printer").Activate
ActiveCell.Offset(rowOffset:=3 + Sheets("Printer").UsedRange.Rows.Count, columnOffset:=0).Activate
ActiveSheet.Paste


Columns("E:E").EntireColumn.AutoFit




End Sub

Remove Numeric Values In Cell Containg Text And Place In Another Cell
Hi everyone,

I have some data in Excel thats in quite a mess. I have attached a sample file as it might make more sense to see it. Basically there is a column containg random text followed by a set of numbers (numbers are always at the end of the text). I am trying to cut the numbers (which vary in length and some are separated by spaces, others by fullstops) and place them in an adjacent cell. Is this at all possible? So far I have only managed to work out a formular to place the numbers that follow the last space into the adjacent cell.

Any help would be most appreciated - can this be done?

Copy From Worksheet To Worksheet??
I need to copy info from one cell in worksheet1 to another cell in worksheet2. The problem is I have a formulated cell in worksheet1 and when I copy from worksheet1 to worksheet2, it copies the formula. I need to copy the value only. Here's the code I'm using.

Worksheets("BT WORKSHEET").Range("A60").Copy
Worksheets("REQ.").Select
Worksheets("REQ.").Range("B11").Select
Worksheets("REQ.").Paste

Thanks for any help.

To Copy Worksheet At The End Of Other Worksheet
I WANT TO KNOW HOW TO COPY THE EXCEL WORKSHEET AT THE END OF OTHER WORKBOOK SHEET.
I HAVE WRITTEN CODE IN VB6.0 BUT IT OVERWRITE THE WORKSHEET WHILE COPYING.

Private Sub File1_Click()
Dim FileToCopy As String: FileToCopy = "T:PRODUCTIONPRODUCTION FILESELECTRONIC PRODUCTION CONTROLSMASTER_FILECAP 8 MASTER FOR RS232 V.95.xls"
Dim NewFile As String: NewFile = "T:PRODUCTIONPRODUCTION FILESELECTRONIC PRODUCTION CONTROLS2005" + File1.FileName
FileCopy FileToCopy, NewFile
Exit Sub
End Sub

Private Sub Form_Load()
Me.Show
Me.Caption = "Copying..."
File1.Path = "T:PRODUCTIONPRODUCTION FILESELECTRONIC PRODUCTION CONTROLS2005"

End Sub

Automatically Calculate Row Or Cell Range Triggered By Cell Entry
Due to the slow speed of calculation (due to its size) of my excel spreadsheet I have turned calculation to manual.

I would like to trigger automatically a row to recalculate (or perhaps part of the row) once a cell entry has changed.

Can anyone help.

Copyright 2005-08 www.BigResource.com, All rights reserved