Kemidan2014
Board Regular
- Joined
- Apr 4, 2022
- Messages
- 229
- Office Version
- 365
- Platform
- Windows
Good afternoon,
I have an onclick macro that uses a method of copying data from my form to an excel file using the following method
VBA opens an excel file template in a master folder
then the code uses the following type of coding to copy information into cells
The only issue is sometimes depending on the length of characters I am copying or making equal to; the excel sheet row heights grow by alot forcing the user to resize.
is there another VBA code I can force a format to keep the row heights or column widths as original row height for the various cells I am writing to in this method? i would have shown pictures but they have already corrected the issue before i was able to post this
I have an onclick macro that uses a method of copying data from my form to an excel file using the following method
VBA opens an excel file template in a master folder
then the code uses the following type of coding to copy information into cells
VBA Code:
wbTarget.worksheets("Report").Range("E6").Value = [QIMS#] 'field name we want copied into destination cell
wbTarget.worksheets("Report").Range("E6:H6").Merge 'Merges cell ranges
wbTarget.worksheets("Report").Range("E6:H6").HorizontalAlignment = xlCenter 'Center align
The only issue is sometimes depending on the length of characters I am copying or making equal to; the excel sheet row heights grow by alot forcing the user to resize.
is there another VBA code I can force a format to keep the row heights or column widths as original row height for the various cells I am writing to in this method? i would have shown pictures but they have already corrected the issue before i was able to post this