Forum Discussion
2Jenn
Jun 30, 2022Copper Contributor
Changing column width within a page
Hi. I'm hoping this is a relatively easy question. Is there a way to change the column width within a spreadsheet for different rows within the sheet? If so, how?
Hi,
I have a client who has his frontend and backend always in the same folder but sometimes copies both files to different computers and thus different paths. So we relink the backend tables every time he starts the application to the folder path of the frontend. Your problem seems similar and could probably be solved = automated with a similar technique:
1. Create a new VBA module in the frontend.
2. Copy this function into the module:
Public Function fctLinkedTablePaths() On Error GoTo myError Dim db As DAO.Database Dim tdf As DAO.TableDef Dim strDbFile As String Set db = CurrentDb For Each tdf In db.TableDefs If tdf.Connect <> "" Then strDbFile = Mid(tdf.Connect, InStrRev(tdf.Connect, "\")) tdf.Connect = ";database=" & CurrentProject.Path & strDbFile tdf.RefreshLink End If Next tdf myExit: Exit Function myError: Select Case Err.Number Case 9999 'trap specific errors Case Else MsgBox "Exception No. " & Err.Number & ". " & Err.Description Resume myExit End Select End Function
3. Create a new macro called: AutoExec
4. In the macro choose the action: RunCode
and as Function Name: =fctLinkedTablePaths()
Servus
Karl
****************
Access Bug Trackers
Access News
Access DevCon
4 Replies
Sort By
No, that is not possible. All cells within a column have the same width, and all cells within a row have the same height.
You can simulate different widths to some extent by merging cells, but I would avoid that unless you absolutely need to.
- 2JennCopper ContributorThanks. I'll stop looking!
- mathetesSilver Contributor
I'll first agree strongly with the response you got from HansVogelaar , specifically his warning against simulating different widths by merging cells. Doing that interferes with a lot of Excel functions for manipulating data,
Could I also back up and ask why you were seeking to do that in the first place? What is the nature of the information in your spreadsheet? Might you be better served by a table in Word?