+ Reply to Thread
Results 1 to 4 of 4

how to do not change the font when i run the font size and font will not change..

Hybrid View

  1. #1
    Forum Contributor
    Join Date
    08-20-2015
    Location
    philippines
    MS-Off Ver
    2013
    Posts
    260

    how to do not change the font when i run the font size and font will not change..

    how to do not change the font and font size i assign to the cell where's the macro result i show..

    i want to set a font in my sheet 2 for the result.. but when i run the macro the result of the program. will change the font style and size of my result..

    this is my program.

    Sub Macro1()
       Dim sh1 As Worksheet
       Dim sh2 As Worksheet
       Dim lastRow As Long, r As Long
       Dim destRow As Long, qty As Integer
    
       With ThisWorkbook
          Set sh1 = .Sheets(1)
          Set sh2 = .Sheets(2)
       End With
    
       Application.ScreenUpdating = False
       lastRow = sh1.Cells(Rows.Count, 1).End(xlUp).Row
       sh2.Range("3:" & Rows.Count).ClearContents
       destRow = 3
       For r = 3 To lastRow
          qty = sh1.Cells(r, 3)
       
          If qty > 0 Then
             sh1.Cells(r, 1).Resize(, 7).Copy sh2.Cells(destRow, 2).Resize(qty)
             sh2.Cells(destRow, 4).Resize(qty) = 1
             destRow = destRow + qty
          End If
       Next r
       Application.ScreenUpdating = True
    End Sub

  2. #2
    Forum Expert Keebellah's Avatar
    Join Date
    01-12-2014
    Location
    The Netherlands
    MS-Off Ver
    Office 2021 (Windows)
    Posts
    7,906

    Re: how to do not change the font when i run the font size and font will not change..

    You will have to copy the values only.
    ---
    Hans
    "IT" Always crosses your path!
    May the (vba) code be with you... if it isn't; start debugging!
    If you like my answer, Click the * below to say thank-you

  3. #3
    Forum Contributor
    Join Date
    08-20-2015
    Location
    philippines
    MS-Off Ver
    2013
    Posts
    260

    Re: how to do not change the font when i run the font size and font will not change..

    how sir Keebellah ?

  4. #4
    Forum Expert Keebellah's Avatar
    Join Date
    01-12-2014
    Location
    The Netherlands
    MS-Off Ver
    Office 2021 (Windows)
    Posts
    7,906

    Re: how to do not change the font when i run the font size and font will not change..


+ Reply to Thread

Thread Information

Users Browsing this Thread

There are currently 1 users browsing this thread. (0 members and 1 guests)

Similar Threads

  1. How to using comma style without change font & font size
    By rameshtupe in forum Excel General
    Replies: 1
    Last Post: 07-11-2013, 01:19 PM
  2. [SOLVED] Change default font and font size on COMMENTS in cells
    By Thistledown in forum Excel General
    Replies: 4
    Last Post: 11-23-2012, 09:26 AM
  3. change font color and font style in shape
    By maacmaac in forum Excel Programming / VBA / Macros
    Replies: 3
    Last Post: 01-05-2011, 10:05 AM
  4. How to change the font/font size in a combo box
    By brendas in forum Excel General
    Replies: 2
    Last Post: 11-07-2005, 04:00 PM
  5. change display font to actual selected font
    By Flannigan in forum Excel General
    Replies: 1
    Last Post: 08-30-2005, 09:05 AM
  6. [SOLVED] font is 10 pt:how do i change the font size in a combo box?
    By nkruppa in forum Excel Formulas & Functions
    Replies: 1
    Last Post: 08-10-2005, 05:05 PM

Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts

Search Engine Friendly URLs by vBSEO 3.6.0 RC 1